Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671074 - app-misc/vifm-0.10[developer] : fops_cpmv.c:139:46: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
Summary: app-misc/vifm-0.10[developer] : fops_cpmv.c:139:46: error: ‘snprintf’ output ...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-13 12:52 UTC by Stefan Strogin
Modified: 2019-05-20 15:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,31.79 KB, text/plain)
2018-11-13 12:52 UTC, Stefan Strogin
Details
build.log (build.log,20.58 KB, text/plain)
2018-11-13 12:57 UTC, Stefan Strogin
Details
environment (environment,71.80 KB, text/plain)
2018-11-13 12:57 UTC, Stefan Strogin
Details
emerge-info (emerge-info,6.40 KB, text/plain)
2018-11-13 13:00 UTC, Stefan Strogin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Strogin gentoo-dev 2018-11-13 12:52:32 UTC
Created attachment 555010 [details]
build.log

fops_cpmv.c: In function ‘fops_cpmv’:
fops_cpmv.c:139:46: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
   snprintf(dst_full, sizeof(dst_full), "%s/%s", path, dst);
                                              ^
fops_cpmv.c:139:3: note: ‘snprintf’ output 2 or more bytes (assuming 4098) into a destination of size 4097
   snprintf(dst_full, sizeof(dst_full), "%s/%s", path, dst);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fops_cpmv.c: In function ‘fops_replace’:
fops_cpmv.c:213:54: error: ‘%s’ directive output may be truncated writing up to 4096 bytes into a region of size 309 [-Werror=format-truncation=]
  snprintf(undo_msg, sizeof(undo_msg), "Copying %s to %s",
                                                      ^~
    replace_home_part(src_full), dst_dir);
                                 ~~~~~~~               
fops_cpmv.c:213:2: note: ‘snprintf’ output 13 or more bytes (assuming 4109) into a destination of size 321
  snprintf(undo_msg, sizeof(undo_msg), "Copying %s to %s",
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    replace_home_part(src_full), dst_dir);
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../build-aux   -I/usr/include/ncursesw  -march=skylake -O2 -pipe -fsigned-char -Wall -pthread -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/uuid -I/usr/include/freetype2 -g -O0 -Werror -Werror=sign-compare -Wno-unused-parameter  -include ../build-aux/config.h -c -o fops_put.o fops_put.c
fops_misc.c: In function ‘change_link_cb’:
fops_misc.c:575:63: error: ‘%s’ directive output may be truncated writing up to 4096 bytes into a region of size 302 [-Werror=format-truncation=]
  snprintf(undo_msg, sizeof(undo_msg), "cl in %s: on %s from \"%s\" to \"%s\"",
                                                               ^~
    replace_home_part(flist_get_dir(curr_view)), fname, linkto, new_target);
                                                        ~~~~~~  
fops_misc.c:575:2: note: ‘snprintf’ output 26 or more bytes (assuming 4122) into a destination of size 320
  snprintf(undo_msg, sizeof(undo_msg), "cl in %s: on %s from \"%s\" to \"%s\"",
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    replace_home_part(flist_get_dir(curr_view)), fname, linkto, new_target);
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:1548: fops_cpmv.o] Error 1
make[1]: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make[1]: *** [Makefile:1548: fops_misc.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-misc/vifm-0.10/work/vifm-0.10/src'
make: *** [Makefile:381: all-recursive] Error 1


$ gcc-config -l
 [1] armv7a-hardfloat-linux-gnueabihf-7.3.0 *

 [2] x86_64-pc-linux-gnu-8.2.0 *

$ emerge -pqv '=app-misc/vifm-0.10::gentoo'
[ebuild     U ] app-misc/vifm-0.10 [0.9.1] USE="X developer extended-keys gtk magic vim vim-syntax"
Comment 1 Stefan Strogin gentoo-dev 2018-11-13 12:57:01 UTC
Created attachment 555012 [details]
build.log
Comment 2 Stefan Strogin gentoo-dev 2018-11-13 12:57:36 UTC
Created attachment 555014 [details]
environment
Comment 3 Stefan Strogin gentoo-dev 2018-11-13 13:00:02 UTC
Created attachment 555016 [details]
emerge-info