ho hum, another incorrect bound to snprintf

margarida@ ok, submitted upstream
This commit is contained in:
avsm 2003-04-16 16:44:49 +00:00
parent f5badbd7a0
commit b78302353b

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-egon_fileio_ppt_c,v 1.1 2003/04/16 16:44:49 avsm Exp $
--- egon/fileio_ppt.c.orig Wed Apr 16 16:07:53 2003
+++ egon/fileio_ppt.c Wed Apr 16 16:08:36 2003
@@ -479,7 +479,7 @@ static int load(char *fn, buffer *b)
row = 1;
sty = MW_STY_DEFAULT;
- strncpy(filename, fn, 1000);
+ strncpy(filename, fn, sizeof filename);
cfs = cole_mount(filename, &colerrno);
if (cfs == NULL) {
cole_perror("Egon", colerrno);