GNOME Bugzilla – Bug 353613
Negative array access in get_extension
Last modified: 2006-08-31 18:57:32 UTC
In get_extension (libgthumb/file-utils.c) line 593 is : ((ptr[p] != '.') && (p >= 0)) a better condition would be ((p >= 0) && (ptr[p] != '.')) Currently we access ptr[-1] in the test when there is no dot in the path. (Found with valgrind)
Created attachment 71938 [details] [review] Patch changing the order of tests
patch applied, thanks.