Tk Library Source Code

View Ticket
Login
Ticket UUID: 665737
Title: (v1.3) coding error causes failure in exif::makerNote
Type: Bug Version: None
Submitter: timje Created on: 2003-01-10 14:19:22
Subsystem: exif Assigned To: andreas_kupries
Priority: 7 High Severity:
Status: Closed Last Modified: 2003-04-02 02:42:56
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2003-04-01 19:42:56
Description:
In tcllib 1.3's exif module, in the exif::makerNote
procedure, under the "$tag == 15" elseif (line 544),
there are eight references in 'if' expressions to '$v'
instead of the proper '$value'.  This bug goes
unnoticed in many cases, but an error will occur if
'$v' happens to contain a value that TCL can't convert
to a boolean.  In my case, parsing JPEGs from a Canon
EOS-D60, 3 files out of 150 caused a problem.  In each
case, $v returned "+1/3", which TCL refused to booleanize.

The fix ($v => $value in the eight 'if' clauses) fixed
things nicely.
User Comments: andreas_kupries added on 2003-04-02 02:42:56:
Logged In: YES 
user_id=75003

Patch applied. File based interface added. documentation 
updated. No work on the jpeg stuff and usage of Img. Better a 
separate feature request. Code for that left in, commented out.

andreas_kupries added on 2003-04-02 02:16:11:

File Added - 46502: exif.patch

Logged In: YES 
user_id=75003

Got the patch. I see that that the change was to rename 'val' 
to 'v' and correct the places refering to 'val' instead of the 
places refering 'v' (of which we have more).

There also spelling fixes, additional tags, exporting a 
thumbnail file if possible, and interface changes (stream to 
file). Regarding the latter I will change the code to provide 
both interfaces, without losing the thumbnail stuff.

andreas_kupries added on 2003-03-29 00:28:18:
Logged In: YES 
user_id=75003

Hm.

"$tag -== 15" is line 554 in the current codebase.
And the nearest applicable variable I see is "val", not "value".
At last I count 11 references to $v. These are enough 
differences to make me hesitate in simply changing the code 
without knowing what you actually changed in your code to 
make it work.

Please create a patch detailing your changes and either 
attach it to this report, or send it directly to both 
<[email protected]> and 
<[email protected]>. Thanks.

Attachments: