[Python-modules-team] Bug#727098: Bug in python-exif
Walter Valenti
waltervalenti at yahoo.it
Tue Oct 22 09:36:41 UTC 2013
Package: python-exif
Version: 1.1.0-1
Debian Testing (i386), Python 2.7.5+
On /usr/share/pyshared/EXIF.py,
when the condition is: data[base:base+2]=='\xFF\xEC' (line 1717),
the "while 1" cicle (line 1670), should end with a break.
Currently with the condition data[base:base+2]=='\xFF\xEC'
it goes in infinite loop.
It is:
elif data[base:base+2]=='\xFF\xEC':
# APP12
if debug: print "APP12 XMP (Ducky) or Pictureinfo segment at base",hex(base)
if debug: print "Got",hex(ord(data[base])), hex(ord(data[base+1])),"and", data[4+base:10+base], "instead."
if debug: print "Length",hex(ord(data[base+2])), hex(ord(data[base+3]))
if debug: print "Code",data[base+4:base+8]
if debug: print "Increment base by",ord(data[base+2])*256+ord(data[base+3])+2
print "There is useful EXIF-like data here (quality, comment, copyright), but we have no parser for it."
base=base+ord(data[base+2])*256+ord(data[base+3])+2
it should be:
elif data[base:base+2]=='\xFF\xEC':
# APP12
if debug: print "APP12 XMP (Ducky) or Pictureinfo segment at base",hex(base)
if debug: print "Got",hex(ord(data[base])), hex(ord(data[base+1])),"and", data[4+base:10+base], "instead."
if debug: print "Length",hex(ord(data[base+2])), hex(ord(data[base+3]))
if debug: print "Code",data[base+4:base+8]
if debug: print "Increment base by",ord(data[base+2])*256+ord(data[base+3])+2
print "There is useful EXIF-like data here (quality, comment, copyright), but we have no parser for it."
break
Thank
Walter
More information about the Python-modules-team
mailing list