summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-05-14 21:16:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-05-14 21:16:52 +0000
commit16702423142900702c4d825f9b806f9b19b77356 (patch)
tree7a91923989538dfd755191d8f6a88a4797530230 /gnu
parentdc315e71ee8035dff83bf123daa23e0faf00f467 (diff)
more careful scanf
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/cvs/src/rcs.c2
-rw-r--r--gnu/usr.bin/cvs/src/update.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/gnu/usr.bin/cvs/src/rcs.c b/gnu/usr.bin/cvs/src/rcs.c
index 29461b69d3f..c74e5ea7e24 100644
--- a/gnu/usr.bin/cvs/src/rcs.c
+++ b/gnu/usr.bin/cvs/src/rcs.c
@@ -3831,7 +3831,7 @@ RCS_checkout (rcs, workfile, rev, nametag, options, sout, pfn, callerdat)
if (info != NULL)
{
/* If the size of `devtype' changes, fix the sscanf call also */
- char devtype[16];
+ char devtype[16+1];
if (sscanf (info->data, "%16s %lu",
devtype, &devnum_long) < 2)
diff --git a/gnu/usr.bin/cvs/src/update.c b/gnu/usr.bin/cvs/src/update.c
index 31ee6ca2c75..7933dd23c86 100644
--- a/gnu/usr.bin/cvs/src/update.c
+++ b/gnu/usr.bin/cvs/src/update.c
@@ -2580,7 +2580,7 @@ special_file_mismatch (finfo, rev1, rev2)
else
{
/* If the size of `ftype' changes, fix the sscanf call also */
- char ftype[16];
+ char ftype[16+1];
if (sscanf (n->data, "%16s %lu", ftype,
&dev_long) < 2)
error (1, 0, "%s:%s has bad `special' newphrase %s",
@@ -2655,7 +2655,7 @@ special_file_mismatch (finfo, rev1, rev2)
else
{
/* If the size of `ftype' changes, fix the sscanf call also */
- char ftype[16];
+ char ftype[16+1];
if (sscanf (n->data, "%16s %lu", ftype,
&dev_long) < 2)
error (1, 0, "%s:%s has bad `special' newphrase %s",