mirror of
https://github.com/openwrt/packages.git
synced 2025-12-24 01:58:35 +04:00
tcpproxy: fix Wformat warning
snprintf call requires one more byte for NULL termunator. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
11
net/tcpproxy/patches/010-format.patch
Normal file
11
net/tcpproxy/patches/010-format.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/src/log.c
|
||||
+++ b/src/log.c
|
||||
@@ -244,7 +244,7 @@ void log_print_hex_dump(log_prio_t prio,
|
||||
for(i=0; i < len; i++) {
|
||||
if(((i+1)*3) >= (MSG_LENGTH_MAX - offset))
|
||||
break;
|
||||
- snprintf(ptr, 3, "%02X ", buf[i]);
|
||||
+ snprintf(ptr, 4, "%02X ", buf[i]);
|
||||
ptr+=3;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user