blob: 0b91cc4e328a694391da2896e9cc5a8c2a2a29c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
Author: <jblache@debian.org>
Description: Fix an off-by-one.
Index: trunk/src/xcam.c
===================================================================
--- trunk.orig/src/xcam.c
+++ trunk/src/xcam.c
@@ -1287,7 +1287,7 @@ save_frame_button (GtkWidget * widget, g
/* 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)) ||
|