From 8155d83f75cb8a35e84741eafb2377e61cbad241 Mon Sep 17 00:00:00 2001 From: Peter Avalos Date: Sun, 21 Jan 2007 17:58:42 +0000 Subject: [PATCH] If there is no commitid, we need to initialize Delta->commitid to NULL to prevent segmentation faults later. --- gnu/usr.bin/rcs/lib/rcssyn.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gnu/usr.bin/rcs/lib/rcssyn.c b/gnu/usr.bin/rcs/lib/rcssyn.c index f530ee4f04..d59abd826e 100644 --- a/gnu/usr.bin/rcs/lib/rcssyn.c +++ b/gnu/usr.bin/rcs/lib/rcssyn.c @@ -37,7 +37,7 @@ Report problems and direct all questions to: /* * $FreeBSD: src/gnu/usr.bin/rcs/lib/rcssyn.c,v 1.7 1999/08/27 23:36:48 peter Exp $ - * $DragonFly: src/gnu/usr.bin/rcs/lib/rcssyn.c,v 1.3 2007/01/17 17:56:23 y0netan1 Exp $ + * $DragonFly: src/gnu/usr.bin/rcs/lib/rcssyn.c,v 1.4 2007/01/21 17:58:42 pavalos Exp $ * * Revision 5.15 1995/06/16 06:19:24 eggert * Update FSF address. @@ -156,7 +156,7 @@ Report problems and direct all questions to: #include "rcsbase.h" -libId(synId, "$DragonFly: src/gnu/usr.bin/rcs/lib/rcssyn.c,v 1.3 2007/01/17 17:56:23 y0netan1 Exp $") +libId(synId, "$DragonFly: src/gnu/usr.bin/rcs/lib/rcssyn.c,v 1.4 2007/01/21 17:58:42 pavalos Exp $") static char const *getkeyval P((char const*,enum tokens,int)); static int getdelta P((void)); @@ -441,7 +441,9 @@ getdelta() Delta->commitid = NextString; nextlex(); getsemi(Kcommitid); - } + } else { + Delta->commitid = NULL; + } Delta->ig = getphrases(Kdesc); TotalDeltas++; -- 2.11.4.GIT