Will,

Patch applied.
Thanks.

On Wed, Nov 20, 2013 at 4:37 PM, William Cohen <wco...@redhat.com> wrote:
> A Coverity scan pointed out that the argument for the sizeof() for a
> perf_read_buffer() call was suspect.  The perf_read_buffer() third
> argument is the size of the buffer pointed to in the second argument.
> Other places in the code are doing that and this call should also.
> ---
>  perf_examples/perf_util.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/perf_examples/perf_util.c b/perf_examples/perf_util.c
> index cc8b002..a5635d5 100644
> --- a/perf_examples/perf_util.c
> +++ b/perf_examples/perf_util.c
> @@ -350,7 +350,7 @@ perf_display_stack_user(perf_event_desc_t *hw, FILE *fp)
>         size_t sz;
>         int ret;
>
> -       ret = perf_read_buffer(hw, &nr, sizeof(hw));
> +       ret = perf_read_buffer(hw, &nr, sizeof(nr));
>         if (ret)
>                 errx(1, "cannot user stack size");
>
> --
> 1.8.3.1
>
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> perfmon2-devel mailing list
> perfmon2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to