commit 9cf111abf80b34081313c84fa1330330d702ae59 parent 7edc8dbe2ea40d1a4b99e18cbb5da5fdd5d0d5b8 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 1 Dec 2015 19:34:01 +0100 ed: whoops, check strdup ofcourse Diffstat:
M | ed.c | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ed.c b/ed.c @@ -418,7 +418,8 @@ setfname(char *fname) if (fname == savfname) return; - s = strdup(fname); + if (!(s = strdup(fname))) + error("out of memory"); free(savfname); savfname = s; }