fix a couple of off-by-one errors in sscanf handling.

patches have been submitted and accepted upstream
pvalchev@ ok
This commit is contained in:
avsm 2003-06-18 20:23:41 +00:00
parent e65c22587d
commit 96c73b8cd6
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-fvwm_builtins_c,v 1.1 2003/06/18 20:23:41 avsm Exp $
--- fvwm/builtins.c.orig Wed Jun 18 03:23:34 2003
+++ fvwm/builtins.c Wed Jun 18 03:23:52 2003
@@ -1472,7 +1472,7 @@ Bool ReadDecorFace(char *s, DecorFace *d
/* some variants of scanf do not increase the assign count when %n is used,
* so a return value of 1 is no error. */
- if (sscanf(s, "%256s%n", style, &offset) < 1)
+ if (sscanf(s, "%255s%n", style, &offset) < 1)
{
if (verbose)
{

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-modules_FvwmGtk_FvwmGtk_c,v 1.1 2003/06/18 20:23:41 avsm Exp $
--- modules/FvwmGtk/FvwmGtk.c.orig Wed Jun 18 03:24:21 2003
+++ modules/FvwmGtk/FvwmGtk.c Wed Jun 18 03:24:32 2003
@@ -349,7 +349,7 @@ process_message (unsigned long type,
case M_STRING:
SendUnlockNotification(fvwm_fd);
context = body[0]; /* this is tmp_win->w */
- sscanf ((char*) (&body[3]), "%128s %d", name, &button);
+ sscanf ((char*) (&body[3]), "%127s %d", name, &button);
widget = g_hash_table_lookup (widgets, name);
if (!widget)
{