Files
libguestfs/cat
Richard W.M. Jones a75076f271 GCC 7: Allocate sufficient space for sprintf output.
GCC 7.0.1 can determine if there is likely to be sufficient space in
the output buffer when using sprintf/snprintf, based on the format
string.

The errors were all either of this form:

bindtests.c:717:29: error: '%zu' directive output may be truncated writing between 1 and 19 bytes into a region of size 16 [-Werror=format-truncation=]
     snprintf (strs[i], 16, "%zu", i);
                             ^~~
bindtests.c:717:28: note: directive argument in the range [0, 2305843009213693951]
     snprintf (strs[i], 16, "%zu", i);
                             ^~~~~

or this form:

sync.c: In function 'fsync_devices':
sync.c:108:50: error: '%s' directive output may be truncated writing up to 255 bytes into a region of size 251 [-Werror=format-truncation=]
       snprintf (dev_path, sizeof dev_path, "/dev/%s", d->d_name);
                                                  ^~

Fixed by converting these into dynamic allocation, or making the
output buffer larger, whichever was easier.

There is a gnulib macro we can use to make this simpler for integers.
It requires a new gnulib module (intprops), but it turns out that we
were already pulling that in through dependencies, so the change to
bootstrap is a no-op.  (thanks: Dan Berrange)
2017-02-14 17:53:28 +00:00
..
2016-10-12 13:49:46 +01:00
2016-10-12 13:49:46 +01:00
2016-10-12 13:49:46 +01:00
2016-07-01 15:49:17 +02:00
2017-01-03 16:48:21 +01:00
2017-01-03 16:48:21 +01:00
2016-10-12 13:49:46 +01:00