[hackers] [sbase] ed: fix commit 2ccc1e8 || Roberto E. Vargas Caballero
commit 9ab1478f1eb6a9a355d394af3c0cfa69850245fe
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Tue Jan 10 11:28:58 2017 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Tue Jan 10 11:30:34 2017 +0100
ed: fix commit 2ccc1e8
The patch was wrong because the prototype of
strcpy is different to the prototype of strlcpy
diff --git a/ed.c b/ed.c
index 82fb784..4b28848 100644
--- a/ed.c
+++ b/ed.c
_AT_@ -611,8 +611,7 @@ dowrite(const char *fname, int trunc)
curln = line2;
if (fclose(fp))
error("input/output error");
- if (strcpy(savfname, fname, sizeof(savfname)) >= sizeof(savfname))
- error("file name too long");
+ strcpy(savfname, fname);
modflag = 0;
curln = line;
}
Received on Tue Jan 10 2017 - 11:30:40 CET
This archive was generated by hypermail 2.3.0
: Tue Jan 10 2017 - 11:36:17 CET