The attached patch fixes this warning:

==23351== Syscall param open(filename) points to unaddressable byte(s)
==23351==    at 0x82C4330: open (in /lib/libc-2.7.so)
==23351==    by 0x8269542: _IO_file_open (in /lib/libc-2.7.so)
==23351==    by 0x82697F3: _IO_file_fopen (in /lib/libc-2.7.so)
==23351==    by 0x825E783: (within /lib/libc-2.7.so)
==23351==    by 0x599DDF3: gdk_pixbuf_savev (gdk-pixbuf-io.c:1730)
==23351==    by 0x599DCF1: gdk_pixbuf_save (gdk-pixbuf-io.c:1645)
==23351==    by 0x42AE4D: rs_tiff_load_thumb (tiff-meta.c:722)
==23351==    by 0x45E0A6: load_loadable (rs-store.c:848)
==23351==    by 0x45E5ED: rs_store_load_directory (rs-store.c:965)
==23351==    by 0x41ED7C: gui_init (gtk-interface.c:1123)
==23351==    by 0x4123AC: main (rawstudio.c:1068)
==23351==  Address 0xb9afd88 is 0 bytes inside a block of size 128 free'd
==23351==    at 0x4C22B2E: free (vg_replace_malloc.c:323)
==23351==    by 0x6EB6BA4: g_free (gmem.c:190)
==23351==    by 0x42A8E4: rs_tiff_load_thumb (tiff-meta.c:624)
==23351==    by 0x45E0A6: load_loadable (rs-store.c:848)
==23351==    by 0x45E5ED: rs_store_load_directory (rs-store.c:965)
==23351==    by 0x41ED7C: gui_init (gtk-interface.c:1123)
==23351==    by 0x4123AC: main (rawstudio.c:1068)

Cheers,
Rafael
Index: src/tiff-meta.c
===================================================================
--- src/tiff-meta.c	(revision 1851)
+++ src/tiff-meta.c	(working copy)
@@ -621,8 +621,11 @@
 		if (g_file_test(thumbname, G_FILE_TEST_EXISTS))
 		{
 			pixbuf = gdk_pixbuf_new_from_file(thumbname, NULL);
-			g_free(thumbname);
-			if (pixbuf) return(pixbuf);
+			if (pixbuf)
+			{
+				g_free(thumbname);
+				return(pixbuf);
+			}
 		}
 	}
 
_______________________________________________
Rawstudio-dev mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev

Reply via email to