openbsd-ports/graphics/sane-frontends/patches/patch-src_xscanimage_c
alek fa4f4f5b8a Import sane-frontends 1.0.14
sane-frontends contains applications for SANE (Scanner Access Now Easy).
This package provides the graphical frontends xscanimage and xcam. Both
use the GTK+ toolkit. xscanimage is used for scanners, xcam for cameras.
xscanimage can also be used as gimp plugin. The package also provides
the command-line frontend scanadf which is based on scanimage and is
intended for scanners that use automatic document feeders.

From Antoine Jacoutot <ajacoutot@lphp.org>
2005-11-03 15:30:12 +00:00

13 lines
629 B
Plaintext

$OpenBSD: patch-src_xscanimage_c,v 1.1.1.1 2005/11/03 15:30:12 alek Exp $
--- src/xscanimage.c.orig Tue Oct 11 12:22:56 2005
+++ src/xscanimage.c Tue Oct 11 12:23:30 2005
@@ -1284,7 +1284,7 @@ scan_dialog (GtkWidget * widget, gpointe
{ /* We are running in standalone mode */
/* test for pnm formats */
strncpy (testfilename, preferences.filename, sizeof (testfilename));
- testfilename[sizeof (testfilename)] = 0;
+ testfilename[sizeof (testfilename) - 1] = 0;
g_strreverse (testfilename);
if (!((!strncmp (testfilename, "mnp.", 4)) ||
(!strncmp (testfilename, "mgp.", 4)) ||