aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-07-30 10:06:30 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2018-07-30 10:06:30 +0200
commitfcbe44439afdfd78b6bebe82585fa27f8eb6f606 (patch)
treea526c1779041b96093115ea3064c1b74bdce96ab /contrib
parent50b30c46ac6ae92a80167054e3dd691181db21c6 (diff)
stress-buffer/libmedia_dev/rds-ctl: fix gcc-8.1 warnings
Fix various snprintf warnings of this type: get_media_devices.c: In function ‘get_class’: get_media_devices.c:147:33: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Wformat-truncation=] snprintf(fname, PATH_MAX, "%s/%s", dname, entry->d_name); ^~ get_media_devices.c:147:3: note: ‘snprintf’ output between 2 and 4352 bytes into a destination of size 4096 snprintf(fname, PATH_MAX, "%s/%s", dname, entry->d_name); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/test/stress-buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/test/stress-buffer.c b/contrib/test/stress-buffer.c
index 60410c70..fd6e3f69 100644
--- a/contrib/test/stress-buffer.c
+++ b/contrib/test/stress-buffer.c
@@ -48,7 +48,7 @@
int main(int argc, char **argv)
{
char buffer[1000];
- char fname[30];
+ char fname[100];
int fd, ret, magic_buffer_size, cnt = 0;
time_t t1, t2;
double dif;

Privacy Policy