Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 675344 - net-libs/liboping-1.10.0-r1 - liboping.c:207:9: error: '%s' directive output may be truncated writing up to 255 bytes into a region of size 242 [-Werror=format-truncation=]
Summary: net-libs/liboping-1.10.0-r1 - liboping.c:207:9: error: '%s' directive output ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Thomas Deutschmann (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: werror
  Show dependency tree
 
Reported: 2019-01-13 17:08 UTC by Conrad Kostecki
Modified: 2019-10-24 20:22 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Kostecki gentoo-dev 2019-01-13 17:08:56 UTC
/bin/sh ../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.    -Wall -Werror -march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -c -o liboping_la-liboping.lo `test -f 'liboping.c' || echo './'`liboping.c
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -Wall -Werror -march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -c liboping.c  -fPIC -DPIC -o .libs/liboping_la-liboping.o
liboping.c: In function 'ping_set_ttl':
liboping.c:207:9: error: '%s' directive output may be truncated writing up to 255 bytes into a region of size 242 [-Werror=format-truncation=]
    "%s: %s", function, message);
         ^~
liboping.c:829:6:
      sstrerror (ret, errbuf, sizeof (errbuf)));
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:873,
                 from liboping.c:30:
/usr/include/bits/stdio2.h:67:10: note: '__builtin___snprintf_chk' output between 15 and 270 bytes into a destination of size 256
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
liboping.c:207:9: error: '%s' directive output may be truncated writing up to 255 bytes into a region of size 242 [-Werror=format-truncation=]
    "%s: %s", function, message);
         ^~
liboping.c:842:6:
      sstrerror (ret, errbuf, sizeof (errbuf)));
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:873,
                 from liboping.c:30:
/usr/include/bits/stdio2.h:67:10: note: '__builtin___snprintf_chk' output between 15 and 270 bytes into a destination of size 256
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
liboping.c: In function 'ping_set_qos':
liboping.c:207:9: error: '%s' directive output may be truncated writing up to 255 bytes into a region of size 242 [-Werror=format-truncation=]
    "%s: %s", function, message);
         ^~
liboping.c:869:6:
      sstrerror (ret, errbuf, sizeof (errbuf)));
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:873,
                 from liboping.c:30:
/usr/include/bits/stdio2.h:67:10: note: '__builtin___snprintf_chk' output between 15 and 270 bytes into a destination of size 256
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
liboping.c:207:9: error: '%s' directive output may be truncated writing up to 255 bytes into a region of size 242 [-Werror=format-truncation=]
    "%s: %s", function, message);
         ^~
liboping.c:885:6:
      sstrerror (ret, errbuf, sizeof (errbuf)));
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:873,
                 from liboping.c:30:
/usr/include/bits/stdio2.h:67:10: note: '__builtin___snprintf_chk' output between 15 and 270 bytes into a destination of size 256
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [Makefile:593: liboping_la-liboping.lo] Error 1
make[3]: Leaving directory '/var/tmp/portage/net-libs/liboping-1.10.0-r1/work/liboping-1.10.0/src'
make[2]: *** [Makefile:656: all-recursive] Error 1
make[2]: Leaving directory '/var/tmp/portage/net-libs/liboping-1.10.0-r1/work/liboping-1.10.0/src'
make[1]: *** [Makefile:431: all] Error 2
make[1]: Leaving directory '/var/tmp/portage/net-libs/liboping-1.10.0-r1/work/liboping-1.10.0/src'
make: *** [Makefile:393: all-recursive] Error 1
 * ERROR: net-libs/liboping-1.10.0-r1::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=net-libs/liboping-1.10.0-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-libs/liboping-1.10.0-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-libs/liboping-1.10.0-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-libs/liboping-1.10.0-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/net-libs/liboping-1.10.0-r1/work/liboping-1.10.0'
 * S: '/var/tmp/portage/net-libs/liboping-1.10.0-r1/work/liboping-1.10.0'
Comment 1 Conrad Kostecki gentoo-dev 2019-01-13 17:09:21 UTC
Portage 2.3.55 (python 3.6.6-final-0, default/linux/amd64/17.1, gcc-8.2.0, glibc-2.28-r5, 4.19.9-gentoo x86_64)
=================================================================
System uname: Linux-4.19.9-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_X_990_@_3.47GHz-with-gentoo-2.6
KiB Swap:   25690108 total,  25690108 free
Timestamp of repository gentoo: Sat, 12 Jan 2019 12:45:01 +0000
Head commit of repository gentoo: 5f9cf95e73a30c2fb8381d0f1d2992c415e65850
sh bash 4.4_p23
ld GNU ld (Gentoo 2.31.1 p5) 2.31.1
distcc 3.3.2 x86_64-pc-linux-gnu [disabled]
ccache version 3.5.1 [enabled]
app-shells/bash:          4.4_p23::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.0::gentoo
dev-lang/python:          2.7.15::gentoo, 3.5.5-r1::gentoo, 3.6.6::gentoo, 3.7.0::gentoo
dev-util/ccache:          3.5.1a::gentoo
dev-util/cmake:           3.13.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.40.3::gentoo
sys-apps/sandbox:         2.15::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r3::gentoo
sys-devel/gcc:            8.2.0-r6::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.20::gentoo (virtual/os-headers)
sys-libs/glibc:           2.28-r5::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: --exclude-from=/etc/portage/rsync_excludes

bl4ckb0x
    location: /usr/local/portage
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /etc/teamspeak3-server/ts3server.ini /etc/teamspeak3-server/ts3server_mariadb.ini /etc/teamspeak3-server/tsdns_settings.ini /opt/fhem /usr/share/gnupg/qualified.txt /var/lib/fhem"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/apache2-php7.3/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --quiet-build=n --with-bdeps=y"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-frecord-gcc-switches"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox protect-owned sandbox sfperms sign strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-frecord-gcc-switches"
GENTOO_MIRRORS="http://mirror.netcologne.de/gentoo/"
INSTALL_MASK="/etc/systemd/* /etc/xinetd.d/* /usr/lib/systemd/system/*"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,--sort-common -Wl,-z,now"
LINGUAS="de de_DE"
MAKEOPTS="-j13 -l12"
PKGDIR="/usr/portage/packages"
PORTAGE_BUNZIP2_COMMAND="pbunzip2"
PORTAGE_BZIP2_COMMAND="pbzip2"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9e"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X aalib acl alsa amd64 avahi berkdb bzip2 cairo caps cddb cdinstall cjk cracklib crypt curl cvs cxx dbus dedicated dga djvu encode exif fbcon ffmpeg fftw flac flite fontconfig ftp gd gif git gmp gnutls gphoto2 gpm graphviz gsm gstreamer iconv icu idn imagemagick imlib inotify introspection ipv6 java javascript jbig jit joystick jpeg jpeg2k lcms ldap libcaca libnotify libsamplerate lm_sensors lzma lzo maildir mbox mhash mikmod mmap mng modplug mp3 mysql mysqli ncurses nls nntp nptl nsplugin offensive ogg openal openexr opengl openmp orc oss pam pcre pdf perl pie png posix postproc postscript pulseaudio python qt4 qt5 raw readline rtmp samba scanner sdl session slang sndfile sockets sound speex spell sqlite ssl subversion suid svg symlink syslog tcpd theora threads tiff timidity truetype udev unicode upnp usb v4l vaapi vcd vdpau vhosts vim-syntax vnc vorbis wavpack webkit webp wmf x264 xattr xcb xface xml xmlrpc xmp xmpp xpm xscreensaver xv xvid zeroconf zlib zsh-completion" ABI_X86="32 64" COLLECTD_PLUGINS="cgroups conntrack contextswitch cpu cpufreq cpusleep df disk dns entropy ethstat exec filecount hddtemp hugepages interface ipc iptables irq java load memory mysql netlink nfs nginx numa openvpn ping postgresql processes protocols rrdcached sensors serial smart swap syslog tcpconns thermal turbostat unixsock uptime users" CPU_FLAGS_X86="aes mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2" CURL_SSL="openssl" ELIBC="glibc" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de de_DE" LLVM_TARGETS="AMDGPU" NGINX_MODULES_HTTP="access auth_basic autoindex brotli browser charset fancyindex fastcgi geo geoip geoip2 gunzip gzip headers_more limit_conn proxy realip referer rewrite sticky stub_status upstream_keepalive vhost_traffic_status" NGINX_MODULES_STREAM="access geo geoip geoip2 limit_conn realip return ssl_preread" PHP_TARGETS="php7-2" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6 python3_7" RUBY_TARGETS="ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu radeon"
Unset:  CC, CPPFLAGS, CTARGET, CXX, PORTAGE_BINHOST
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2019-01-13 20:44:26 UTC
Looks like a -Werror is used in CFLAGS.
Comment 3 Larry the Git Cow gentoo-dev 2019-01-14 03:07:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c23d497c3fbdadf86cdc785f5806a36116101e5e

commit c23d497c3fbdadf86cdc785f5806a36116101e5e
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2019-01-14 03:06:58 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2019-01-14 03:06:58 +0000

    net-libs/liboping: remove -Werror
    
    ...and while we are here, add some upstream patches
    for issues reported by Gentoo users.
    
    Closes: https://bugs.gentoo.org/675344
    Package-Manager: Portage-2.3.55, Repoman-2.3.12
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 ...ng-1.10.0-do-not-quit-when-ping_send-fail.patch | 53 +++++++++++++++
 .../liboping/files/liboping-1.10.0-no-werror.patch | 13 ++++
 ...-report-right-error-msg-when-select-fails.patch | 33 ++++++++++
 net-libs/liboping/liboping-1.10.0-r2.ebuild        | 77 ++++++++++++++++++++++
 4 files changed, 176 insertions(+)
Comment 4 Thomas Capricelli 2019-06-18 11:53:03 UTC
I have this exact problem on a (stable) amd64, portage tries and fails to install 1.10.0-r1.

If i understand correctly, those patches are only applied to the ~amd64 version 1.10.0-r2.

This is an awkward situation where unstable is more stable than stable :-)
Comment 5 Larry the Git Cow gentoo-dev 2019-06-18 12:55:46 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1ef9a965570d4aeba6e87845b1ce5c375e57200

commit b1ef9a965570d4aeba6e87845b1ce5c375e57200
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2019-06-18 12:51:36 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2019-06-18 12:55:34 +0000

    net-libs/liboping: move stable keywords
    
    Bug: https://bugs.gentoo.org/675344
    Package-Manager: Portage-2.3.67, Repoman-2.3.14
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 net-libs/liboping/liboping-1.10.0-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 6 Conrad Kostecki gentoo-dev 2019-10-24 20:22:55 UTC
Seems to be fixed now ;-)