mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Henne <henne@nachtwindheim.de>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] [DOCBOOK] fix segfault in docproc.c
Date: Mon, 21 Aug 2006 20:34:29 +0200	[thread overview]
Message-ID: <44E9FCB5.4050101@nachtwindheim.de> (raw)

From: Henrik Kretzschmar <henne@nachtwindheim.de>

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.
This error happens on 2.6.18-rc4-mm[12] when executing make xmldocs.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
---

--- linux-2.6.18-rc4/scripts/basic/docproc.c	2006-06-18 03:49:35.000000000 +0200
+++ linux/scripts/basic/docproc.c	2006-08-18 22:19:48.000000000 +0200
@@ -177,6 +177,7 @@
 		{
 			fprintf(stderr, "docproc: ");
 			perror(real_filename);
+			exit(1);
 		}
 		while(fgets(line, MAXLINESZ, fp)) {
 			char *p;



             reply	other threads:[~2006-08-21 18:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-21 18:34 Henne [this message]
2006-08-21 20:35 ` Randy.Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44E9FCB5.4050101@nachtwindheim.de \
    --to=henne@nachtwindheim.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®