[Crash-utility] [PATCH] Fix segmentation fault
Dave Anderson
anderson at redhat.com
Wed Jan 14 18:21:53 UTC 2009
----- "Bernhard Walle" <bwalle at suse.de> wrote:
> * Executing crash without any parameter results in a segmentation fault.
> * Add a NULL check for pc->orig_namelist to avoid the segmentation fault.
Huh?
The crash utility's program_context structure doesn't even
have an "orig_namelist" member.
Is this perhaps a bug in the SUSE crash utility derivative?
Dave
>
>
> Signed-off-by: Sachin Sant <sachinp at in.ibm.com>
> Acked-by: Bernhard Walle <bwalle at suse.de>
>
>
> 1 file changed, 3 insertions(+)
> symbols.c | 3 +++
>
>
>
> diff --git a/symbols.c b/symbols.c
> --- a/symbols.c
> +++ b/symbols.c
> @@ -266,6 +266,9 @@
> error(NOTE, "gnu_debuglink file: %s\ncrc32: %lx\n",
> contents, crc32);
>
> + if (pc->orig_namelist == NULL)
> + return FALSE;
> +
> if ((pc->debuginfo_file = (char *)
> malloc(((strlen(pc->namelist) + strlen("/.debug/") +
> + strlen(".debug") + strlen(" /usr/lib/debug/boot/ "))*10)
More information about the Crash-utility
mailing list