Random string is returned as a value for an EXIF tag not present

Bug #1054456 reported by zunda
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libexif-ruby (Ubuntu)
New
Undecided
Unassigned

Bug Description

Some JPG files does not have certain EXIF information. For EXIF tags that does not exist, Exif#[] seems to be expected to return nil. Instead, a random string is returned:

$ irb1.8
irb(main):001:0> require 'exif'
=> true
irb(main):002:0> Exif.new('IMG_20110205_142604.jpg')['Date and Time (original)'] # File without the tag
=> "\334+6\267\200\3174\267\001"
irb(main):003:0> Exif.new('IMG_20120914_194443.jpg')['Date and Time (original)'] # File with the tag
=> "2012:09:14 19:44:43"

$ irb1.9.1 -I /usr/lib/ruby/1.9.1/i486-linux
irb(main):001:0> require 'exif'
=> true
irb(main):002:0> Exif.new('IMG_20110205_142604.jpg')['Date and Time (original)']
=> "p\xE4V\xB7x\xE4V\xB7@\xB1\xFB\t@\xE4V\xB7\x02"
irb(main):003:0> Exif.new('IMG_20120914_194443.jpg')['Date and Time (original)']
=> "2012:09:14 19:44:43"

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libexif-ruby 0.1.2-15
ProcVersionSignature: Ubuntu 3.2.0-26.41-generic-pae 3.2.19
Uname: Linux 3.2.0-26-generic-pae i686
NonfreeKernelModules: wl
ApportVersion: 2.0.1-0ubuntu13
Architecture: i386
Date: Fri Sep 21 19:44:18 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release i386 (20120423)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: libexif-ruby
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
zunda (zundan+launchpad) wrote :
Revision history for this message
zunda (zundan+launchpad) wrote :
Revision history for this message
zunda (zundan+launchpad) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "A patch that seems to fix the problem" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Benjamin Kerensa (bkerensa) wrote :

I'm unsure that this is a candidate for us to fix in 12.04.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.