From: Henrik Kretzschmar Date: Fri, 29 Sep 2006 09:00:56 +0000 (-0700) Subject: [PATCH] docbook: fix segfault in docproc.c X-Git-Tag: v2.6.19-rc1~717 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=074a5dde04abc66eea30368c74913d83b1a410f9;p=linux-2.6 [PATCH] docbook: fix segfault in docproc.c Adds a missing exit, if the file that should be parsed couldn't be opened. Without it crashes with a segfault, cause the filedescriptor is accessed even if the file could not be opened. Signed-off-by: Henrik Kretzschmar Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c index cb02baa632..4ab6cbf092 100644 --- a/scripts/basic/docproc.c +++ b/scripts/basic/docproc.c @@ -177,6 +177,7 @@ void find_export_symbols(char * filename) { fprintf(stderr, "docproc: "); perror(real_filename); + exit(1); } while(fgets(line, MAXLINESZ, fp)) { char *p;