From: Jesper Juhl <jesper.juhl@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: jgarzik@pobox.com
Subject: [PATCH] Fix potential NULL pointer deref in gen_init_cpio
Date: Sat, 18 Mar 2006 22:21:10 +0100 [thread overview]
Message-ID: <200603182221.10347.jesper.juhl@gmail.com> (raw)
Fix potential NULL pointer deref in gen_init_cpio.c spotted by
coverity checker.
This fixes coverity bug #86
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
usr/gen_init_cpio.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
--- linux-2.6.16-rc6-mm2-orig/usr/gen_init_cpio.c 2006-01-03 04:21:10.000000000 +0100
+++ linux-2.6.16-rc6-mm2/usr/gen_init_cpio.c 2006-03-18 22:17:18.000000000 +0100
@@ -471,6 +471,7 @@ int main (int argc, char *argv[])
"ERROR: incorrect format, could not locate file type line %d: '%s'\n",
line_nr, line);
ec = -1;
+ break;
}
if ('\n' == *type) {
@@ -506,7 +507,8 @@ int main (int argc, char *argv[])
line_nr, line);
}
}
- cpio_trailer();
+ if (ec == 0)
+ cpio_trailer();
exit(ec);
}
reply other threads:[~2006-03-18 21:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200603182221.10347.jesper.juhl@gmail.com \
--to=jesper.juhl@gmail.com \
--cc=jgarzik@pobox.com \
--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®