rwcarlsen / goexif

Decode embedded EXIF meta data from image files.
BSD 2-Clause "Simplified" License
627 stars 134 forks source link

Infinite loop decoding unknown datatype #30

Closed jbardin closed 9 years ago

jbardin commented 9 years ago

I have another crashing image.

When decoding the exif tags, we end up in an infinite loop decoding the following tags:

t.Type:1 valLen:164 t.Count:164 t.ValOffset:0
t.Type:20 valLen:0 t.Count:144 t.ValOffset:0
t.Type:1 valLen:164 t.Count:164 t.ValOffset:0
t.Type:20 valLen:0 t.Count:144 t.ValOffset:0
jbardin commented 9 years ago

I can add a patch into PR #29 if it's OK, since I have another jpg to add to ./exif/corrupt

rwcarlsen commented 9 years ago

sure.

On Tue, Oct 28, 2014 at 10:35 AM, James Bardin notifications@github.com wrote:

I can add a patch into PR #29 https://github.com/rwcarlsen/goexif/pull/29 if it's OK, since I have another jpg to add to ./exif/corrupt

— Reply to this email directly or view it on GitHub https://github.com/rwcarlsen/goexif/issues/30#issuecomment-60775706.

rwcarlsen commented 9 years ago

fixed in 41dad3aa083329f3f672b7095a9ea8a0c384bbe8.