diff options
author | Tom Hughes <tomhughes@chromium.org> | 2022-03-24 13:38:06 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-03-28 17:21:02 +0000 |
commit | a995e5207db7020bbad2352007894e8196d65bfa (patch) | |
tree | 5bb22e11e780c937727bd4e51254fca338d82162 /util/ecst.h | |
parent | f7330f4cfa3934d7d48a982a164de6987c8a4744 (diff) | |
download | chrome-ec-a995e5207db7020bbad2352007894e8196d65bfa.tar.gz |
util: Increase buffer size to account for terminating NUL
When building with clang it warns:
util/ecst.c:464:7: error: 'sscanf' may overflow; destination buffer in
argument 3 has size 20, but the corresponding specifier may require size
21 [-Werror,-Wfortify-source]
main_str_temp) != 1)) {
^
BRANCH=none
BUG=b:172020503
TEST=./util/compare_build.sh -b all -j 120
=> MATCH
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I0556973263ce2b220e64640e585997c44324db55
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3551680
Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'util/ecst.h')
-rw-r--r-- | util/ecst.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/ecst.h b/util/ecst.h index 04d696c7c5..628eaebe9b 100644 --- a/util/ecst.h +++ b/util/ecst.h @@ -72,7 +72,7 @@ #define NAME_SIZE 160 #define BUFF_SIZE 0x400 #define HEADER_SIZE 64 -#define TMP_STR_SIZE 20 +#define TMP_STR_SIZE 21 #define PAD_VALUE 0x00 |