commit 9ab1478f1eb6a9a355d394af3c0cfa69850245fe
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Tue Jan 10 11:28:58 2017 +0100
Commit:     Roberto E. Vargas Caballero <[email protected]>
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
@@ -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;
 }

Reply via email to