aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Kretzschmar <henne@nachtwindheim.de>2006-09-29 05:00:56 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 12:18:18 -0400
commit074a5dde04abc66eea30368c74913d83b1a410f9 (patch)
treef858588a6a19289ca5b430c3796aa99cbf6f299c
parentaaa2a97eb9c0e91d7abc66bf76811a9599fdb3ee (diff)
[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 <henne@nachtwindheim.de> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--scripts/basic/docproc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c
index cb02baa63256..4ab6cbf09225 100644
--- a/scripts/basic/docproc.c
+++ b/scripts/basic/docproc.c
@@ -177,6 +177,7 @@ void find_export_symbols(char * filename)
177 { 177 {
178 fprintf(stderr, "docproc: "); 178 fprintf(stderr, "docproc: ");
179 perror(real_filename); 179 perror(real_filename);
180 exit(1);
180 } 181 }
181 while(fgets(line, MAXLINESZ, fp)) { 182 while(fgets(line, MAXLINESZ, fp)) {
182 char *p; 183 char *p;