openbsd-ports/graphics/gpicview/patches/patch-src_main-win_c
ajacoutot e3442c7c93 Import gpicview-0.1.9
GPicView is a simple and fast GTK based image viewer.  The minimalistic
design makes it extremly lightweight and fast with low memory usage.


from Robin Eklind <robin0x00 at gmail dot com> with some tweaks
2008-05-16 13:51:40 +00:00

16 lines
665 B
Plaintext

$OpenBSD: patch-src_main-win_c,v 1.1.1.1 2008/05/16 13:51:40 ajacoutot Exp $
--- src/main-win.c.orig Wed Feb 20 19:29:29 2008
+++ src/main-win.c Fri May 16 00:07:48 2008
@@ -694,7 +694,11 @@ int rotate_and_save_jpeg_lossless(char * filename,int
//now copy /tmp/rot.jpg back to the original file
char command[strlen(filename)+50]; //this should not generate buffer owerflow
// MS: didn't know, how to make it better, maybe an own copy routine
+#ifdef __OpenBSD__
+ snprintf(command, sizeof(command), "cp /tmp/rot.jpg \"%s\"",filename);
+#else
sprintf(command,"cp /tmp/rot.jpg \"%s\"",filename);
+#endif
system(command);
return 0;