On Fri, Feb 16, 2018 at 07:38:48PM +0100, Dario Faggioli wrote: > With gcc 7.3.0, the build fails like this: > > src/xenstat_linux.c: In function ‘getBridge’ > src/xenstat_linux.c:78:34: warning: ‘%s’ directive writing up to 255 bytes > into a region of size 241 [-Wformat-overflow=] > sprintf(tmp, "/sys/class/net/%s/bridge", de->d_name); > ^~ > src/xenstat_linux.c:78:5: note: ‘sprintf’ output between 23 and 278 bytes > into a destination of size 256 > sprintf(tmp, "/sys/class/net/%s/bridge", de->d_name); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Fix by making the buffer bigger. > > Signed-off-by: Dario Faggioli <[email protected]>
Acked-by: Wei Liu <[email protected]> _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
