commit | 9ab1478f1eb6a9a355d394af3c0cfa69850245fe | [log] [tgz] |
---|---|---|
author | Roberto E. Vargas Caballero <k0ga@shike2.com> | Tue Jan 10 11:28:58 2017 +0100 |
committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | Tue Jan 10 11:30:34 2017 +0100 |
tree | 5f9ead3544c8f3cd816cbda691ceda66da47ebbf | |
parent | b95c8ed79e5d5322dd3c5c386c3acd62105ac116 [diff] |
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
@@ -611,8 +611,7 @@ 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; }