liboping: fix format-truncation error
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Thu, 6 Dec 2018 22:39:09 +0000 (23:39 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Sat, 8 Dec 2018 08:22:56 +0000 (09:22 +0100)
commit8361c53eac06a8a96fd029e31ca7119e218e1e3e
tree737276654e6908f692073af47fb87f6f138910f6
parent84aeb4419f394b2eb11a22a962bc20e05b311b5f
liboping: fix format-truncation error

liboping.c: In function 'ping_host_add':
liboping.c:207:9: error: '%s' directive output may be truncated writing
up to 255 bytes into a region of size 243 [-Werror=format-truncation=]
    "%s: %s", function, message);
         ^~
liboping.c:1644:40:
    ping_set_error (obj, "getaddrinfo", errmsg);
                                        ~~~~~~
liboping.c:206:2: note: 'snprintf' output between 14 and 269 bytes into
a destination of size 256
  snprintf (obj->errmsg, sizeof (obj->errmsg),
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    "%s: %s", function, message);

Fixes:
 - http://autobuild.buildroot.org/results/b12d86388b495a96194e0bcbb5c19a4e35cbc53d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/liboping/0001-ping_host_add-Decrease-buffer-size-to-make-GCC-s-truncation-check-happy.patch [new file with mode: 0644]