$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;
