----- Original Message -----
> Hi,
> 
> This is a fix for a signed/unsigned comparison bug in vmcoreinfo_read_string.
> The bug causes a segmentation fault if size_vmcoreinfo + 1 is smaller than
> the length of the key string passed in.

I suppose that's true, but can you describe the instance where that actually 
happened?
Can you show the actual note contents as shown by "help -D"?

Thanks,
  Dave


> 
> Signed-off-by: Nuno Das Neves <[email protected]>
> ---
>  netdump.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/netdump.c b/netdump.c
> index 40f9cde..d257ecd 100644
> --- a/netdump.c
> +++ b/netdump.c
> @@ -1838,7 +1838,7 @@ vmcoreinfo_read_string(const char *key)
>               return NULL;
>  
>       /* the '+ 1' is the equal sign */
> -     for (i = 0; i < (size_vmcoreinfo - key_length + 1); i++) {
> +     for (i = 0; i < (int)(size_vmcoreinfo - key_length + 1); i++) {
>               /*
>                * We must also check if we're at the beginning of VMCOREINFO
>                * or the separating newline is there, and of course if we
> --
> 1.8.3.1
> 
> --
> Crash-utility mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/crash-utility
> 

--
Crash-utility mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/crash-utility

Reply via email to