blob: bc3092ec5e5e8ba9c29d6d047e9d033099c78320 [file] [log] [blame] [edit]
Change 640269658 by sungyc@sungyc:fig-export-hunspell-7504-change-4:7520:citc on 2024/06/04 13:44:22
[hunspell][vulnerability fix] Initialize char array
## Test plan
```
sso_client -location 'https://clusterfuzz.corp.google.com/testcase-detail/download-testcase?id=5210985962471424' > /tmp/testcase-5210985962471424 && \
blaze --blazerc=/dev/null test -c opt --config=fuzztest-msan --copt=-DNDEBUG \
--test_strategy=local \
--test_sharding_strategy=disabled \
--test_env=FUZZTEST_REPLAY=/tmp/testcase-5210985962471424 \
--test_filter=LLVMFuzzer.TestOneInput \
//third_party/hunspell/fuzzers:suggestions_fuzzer
```
PRESUBMIT=passed
BUG=336674722
R=tjbarron
APPROVED=tjbarron
REQUIRED_REVIEW=1
DELTA=1 (0 added, 0 deleted, 1 changed)
DELTA_BY_EXTENSION=cxx=1
OCL=639945677
FIG_CHANGESET=97f4e76a9360b2e68df5e7668ad14270d543631a
FIG_WORKSPACE=sungyc/7504:hunspell
MARKDOWN=true
Affected files ...
... //depot//src/hunspell/affentry.cxx#4 edit
==== //depot//src/hunspell/affentry.cxx#3 - /google/src/files/640269658/depot//src/hunspell/affentry.cxx ====
--- /google/src/files/171343973/depot//src/hunspell/affentry.cxx 2017-10-06 17:25:31.000000000 -0400
+++ /google/src/files/640269658/depot//src/hunspell/affentry.cxx 2024-06-04 16:44:22.000000000 -0400
@@ -153,7 +153,7 @@
{
int tmpl; // length of tmpword
struct hentry * he; // hash entry of root word or NULL
- char tmpword[MAXWORDUTF8LEN + 4];
+ char tmpword[MAXWORDUTF8LEN + 4] = {0};
// on entry prefix is 0 length or already matches the beginning of the word.
// So if the remaining root word has positive length