]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3177: Crunch warning.
authorMike Stepanek (mstepane) <mstepane@cisco.com>
Mon, 22 Nov 2021 14:38:54 +0000 (14:38 +0000)
committerMike Stepanek (mstepane) <mstepane@cisco.com>
Mon, 22 Nov 2021 14:38:54 +0000 (14:38 +0000)
Merge in SNORT/snort3 from ~OSHUMEIK/snort3:warning_fix to master

Squashed commit of the following:

commit cd5723264c63ca00476d258ec6f4ab9aa25b4750
Author: Oleksii Shumeiko <oshumeik@cisco.com>
Date:   Mon Nov 22 14:11:02 2021 +0200

    utils: pass an address into memset instead of object

src/utils/js_tokenizer.l

index 2f48242a8cfd117643b06e61bac6089d2bbd6f27..9ae385393d69fb4febb81be55975a9f167956667 100644 (file)
@@ -1388,7 +1388,7 @@ void JSTokenizer::states_reset()
     token = UNDEFINED;
     previous_group = ASI_OTHER;
 
-    memset(states, 0, sizeof(states));
+    memset(&states, 0, sizeof(states));
 
     delete[] tmp_buf;
     tmp_buf = nullptr;