ed

simple ed
git clone git://git.2f30.org/ed.git
Log | Files | Refs

commit 9cf111abf80b34081313c84fa1330330d702ae59
parent 7edc8dbe2ea40d1a4b99e18cbb5da5fdd5d0d5b8
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Tue Dec  1 19:34:01 +0100

ed: whoops, check strdup ofcourse

Diffstat:
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; }