From 6543f49b8b545fdce3c76c9c5a8be7516d0c3743 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sat, 10 Oct 2015 20:12:23 +0200 Subject: [PATCH] cppcheck: fix 2 reports [clientgui/browser.cpp:375]: (error) Width 4096 given in format string (no. 1) is larger than destination buffer 'cookie_value[4096]', use %4095s to prevent overflowing it. [clientgui/browser.cpp:575]: (error) Width 4096 given in format string (no. 1) is larger than destination buffer 'cookie_value[4096]', use %4095s to prevent overflowing it. --- clientgui/browser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clientgui/browser.cpp b/clientgui/browser.cpp index 9c56f77a33..9c1841efac 100644 --- a/clientgui/browser.cpp +++ b/clientgui/browser.cpp @@ -372,7 +372,7 @@ static int find_site_cookie_mozilla_v3( sscanf( argv[0], "%255s", host ); sscanf( argv[1], "%255s", cookie_name ); - sscanf( argv[2], "%4096s", cookie_value ); + sscanf( argv[2], "%4095s", cookie_value ); sscanf( argv[3], #ifdef _WIN32 "%I64d", @@ -572,7 +572,7 @@ static int find_site_cookie_chrome( sscanf( argv[0], "%255s", host ); sscanf( argv[1], "%255s", cookie_name ); - sscanf( argv[2], "%4096s", cookie_value ); + sscanf( argv[2], "%4095s", cookie_value ); sscanf( argv[3], #ifdef _WIN32 "%I64d",