Skip to content

Commit

Permalink
Harden dumping invalid geokeys.
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Dec 5, 2022
1 parent 1643e20 commit 564d9d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## Version 1.3.6

### Improvements

- Harden dumping invalid geokeys ([#77](../../pull/77))

## Version 1.3.5

### Improvements
Expand Down
2 changes: 2 additions & 0 deletions tifftools/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,8 @@ def GeoKeysToDict(keys, ifd, dest=None, linePrefix=''):
asciis = ifd['tags'][Tag.GeoAsciiParamsTag.value]['data'] if Tag.GeoAsciiParamsTag.value in ifd['tags'] else ''
for idx in range(4, len(keys), 4):
keyid, tagval, count, offset = keys[idx:idx + 4]
if not keyid in GeoTiffGeoKey:
continue
name = GeoTiffGeoKey[keyid].name
if not tagval:
result[name] = [offset]
Expand Down

0 comments on commit 564d9d9

Please sign in to comment.