mirror of https://github.com/OISF/suricata
http-json: init 'fields' to 0 before setting it
httplog_ctx->fields would not be initialized before setting flags in it: Scanbuild: output-json-http.c:491:46: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage http_ctx->fields |= (1<<f); ~~~~~~~~~~~~~~~~ ^ 1 warning generated. Drmemory: ~~27874~~ Error #1: UNINITIALIZED READ: reading register eax ~~27874~~ # 0 JsonHttpLogJSON [/home/buildbot/qa/buildbot/donkey/drmemory/Suricata/src/output-json-http.c:260] ~~27874~~ # 1 JsonHttpLogger [/home/buildbot/qa/buildbot/donkey/drmemory/Suricata/src/output-json-http.c:375] Just memset the whole structure right after initialition.pull/961/head
parent
7df9b283f1
commit
2002067fb1
Loading…
Reference in New Issue