lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 3 Nov 2020 09:13:28 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Song Liu <songliubraving@...com>, linux-kernel@...r.kernel.org,
        stable <stable@...r.kernel.org>,
        Jin Yao <yao.jin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [PATCH] perf: increase size of buf in perf_evsel__hists_browse()

Em Sat, Oct 31, 2020 at 09:29:20PM +0100, Jiri Olsa escreveu:
> On Fri, Oct 30, 2020 at 04:54:31PM -0700, Song Liu wrote:
> > Making perf with gcc-9.1.1 generates the following warning:
> > 
> >   CC       ui/browsers/hists.o
> > ui/browsers/hists.c: In function 'perf_evsel__hists_browse':
> > ui/browsers/hists.c:3078:61: error: '%d' directive output may be \
> > truncated writing between 1 and 11 bytes into a region of size \
> > between 2 and 12 [-Werror=format-truncation=]
> > 
> >  3078 |       "Max event group index to sort is %d (index from 0 to %d)",
> >       |                                                             ^~
> > ui/browsers/hists.c:3078:7: note: directive argument in the range [-2147483648, 8]
> >  3078 |       "Max event group index to sort is %d (index from 0 to %d)",
> >       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > In file included from /usr/include/stdio.h:937,
> >                  from ui/browsers/hists.c:5:
> > 
> > IOW, the string in line 3078 might be too long for buf[] of 64 bytes.
> > 
> > Fix this by increasing the size of buf[] to 128.
> > 
> > Fixes: dbddf1747441  ("perf report/top TUI: Support hotkeys to let user select any event for sorting")
> > Cc: stable <stable@...r.kernel.org> # v5.7+
> > Cc: Jin Yao <yao.jin@...ux.intel.com>
> > Cc: Jiri Olsa <jolsa@...nel.org>
> > Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
> > Cc: Arnaldo Carvalho de Melo <acme@...nel.org>
> > Signed-off-by: Song Liu <songliubraving@...com>
> 
> Acked-by: Jiri Olsa <jolsa@...nel.org>



Thanks, applied.

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ