Bernhard Walle <[email protected]> writes:

> That should also go mainline.
>
>
> Signed-off-by : Sachin Sant <[email protected]>
> Acked-by: Bernhard Walle <[email protected]>
>
>
> 1 file changed, 1 insertion(+), 1 deletion(-)
> task.c |    2 +-
>
>
> That should also go mainline.
>
>
> Signed-off-by : Sachin Sant <[email protected]>
> Acked-by: Bernhard Walle <[email protected]>
>
> diff --git a/task.c b/task.c
> --- a/task.c
> +++ b/task.c
> @@ -2902,7 +2902,7 @@
>  {
>       int i, c;
>       struct task_context *tcp;
> -     char format[10];
> +     char format[15];


        c = strlen(buf);
        sprintf(format, "[%c%dll%c]  ", '%', c,
                pc->output_radix == 10 ? 'u' : 'x');

Looks like it should be 11, no?  You have 6 characters + '\0' + the %d,
which can be up to 1500 (BUFSIZE).  Of course, it wouldn't kill us to
use snprintf, either.

Cheers,
Jeff

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

Reply via email to