ed: fix commit 2ccc1e8
The patch was wrong because the prototype of strcpy is different to the prototype of strlcpy
This commit is contained in:
parent
b95c8ed79e
commit
9ab1478f1e
3
ed.c
3
ed.c
@ -611,8 +611,7 @@ dowrite(const char *fname, int trunc)
|
|||||||
curln = line2;
|
curln = line2;
|
||||||
if (fclose(fp))
|
if (fclose(fp))
|
||||||
error("input/output error");
|
error("input/output error");
|
||||||
if (strcpy(savfname, fname, sizeof(savfname)) >= sizeof(savfname))
|
strcpy(savfname, fname);
|
||||||
error("file name too long");
|
|
||||||
modflag = 0;
|
modflag = 0;
|
||||||
curln = line;
|
curln = line;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user