summaryrefslogtreecommitdiffstats
path: root/call/menu.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-07-26 00:48:03 +0200
committerRalf Baechle <ralf@linux-mips.org>2017-07-26 00:48:03 +0200
commitd9f3adc04f69adebb1ec3a5deb30fab3978430bb (patch)
tree1297b4c155c29a2c08d60d0996a8931eae47275e /call/menu.c
parent7243352849ef3f4947d4c25a2a05c1af7151564b (diff)
call: Fix buffer overflow.
When sending files of 1GB or larger, size_buffer was not large enough to hold the number including a trailing \0. This also fixes the following warning: gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT yapp.o -MD -MP -MF .deps/yapp.Tpo -c -o yapp.o yapp.c yapp.c: In function ‘yapp_upload_data’: yapp.c:200:24: warning: ‘%ld’ directive writing between 1 and 11 bytes into a region of size 10 [-Wformat-overflow=] sprintf(size_buffer, "%ld", length); ^~~ yapp.c:200:23: note: directive argument in the range [-2147483648, 2147483647] sprintf(size_buffer, "%ld", length); ^~~~~ yapp.c:200:2: note: ‘sprintf’ output between 2 and 12 bytes into a destination of size 10 sprintf(size_buffer, "%ld", length); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'call/menu.c')
0 files changed, 0 insertions, 0 deletions