From 9ab1478f1eb6a9a355d394af3c0cfa69850245fe Mon Sep 17 00:00:00 2001 From: "Roberto E. Vargas Caballero" Date: Tue, 10 Jan 2017 11:28:58 +0100 Subject: [PATCH] ed: fix commit 2ccc1e8 The patch was wrong because the prototype of strcpy is different to the prototype of strlcpy --- ed.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ed.c b/ed.c index 82fb784..4b28848 100644 --- a/ed.c +++ b/ed.c @@ -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; }