Commit Graph

7541 Commits (ba6a1aa73ebbb5fb9eb3bb03c7e33cad9a0d68db)
 

Author SHA1 Message Date
Jason Ish ba6a1aa73e unittest-helper: fix format string compiler warnings 9 years ago
Jason Ish 4aceaf9fcd detect-stream_size: fix format string compiler warnings 9 years ago
Jason Ish c0377a9870 stream-tcp: fix format string compiler warnings 9 years ago
Jason Ish 5c80a3edf7 modbus: fix format string compiler warnings 9 years ago
Jason Ish 53a8c75385 dnp3: rename "index" variables to "point_index"
Gcc 4.6 will warning with -Wshadow for a local variable
named "index" as <strings.h> has a function named "index".

Newer versions of gcc handle this case.
9 years ago
Jason Ish 2a0bb108d0 dnp3-gen: rename index variable to point_index
Gcc 4.6 will warning with -Wshadow for a local variable
named "index" as <strings.h> has a function named "index".

Newer versions of gcc handle this case.
9 years ago
Victor Julien 4d8e9ae665 qa: add -Wshadow to appveyor builds 9 years ago
Victor Julien b4ac048b41 proto detect: fix -Wshadow warning 9 years ago
Victor Julien 07e1e3e02a dcerpc: fix -Wshadow warnings 9 years ago
Victor Julien 783d2991e5 commandline: fix -Wshadow warnings 9 years ago
Victor Julien 66c213f30c detect-address: fix -Wshadow warnings 9 years ago
Victor Julien 9a20335b6d asn1: fix -Wshadow warnings 9 years ago
Victor Julien dab51144af asn1: modernize test 9 years ago
Victor Julien 613174e9ce yaml: fix tests for -Wshadow 9 years ago
Victor Julien 968813b655 dnp3: fix test for -Wshadow 9 years ago
Victor Julien bb2d8a7133 runmodes: fix -Wshadow warnings 9 years ago
Victor Julien 8c1d157cd2 mpm ac-bs: fix -Wshadow warnings 9 years ago
Victor Julien 0d6d8e01c8 threads: fix -Wshadow warnings 9 years ago
Victor Julien cd04da673b commandline: fix -Wshadow warnings 9 years ago
Victor Julien 69ee2f0eb9 nfq: fix -Wshadow warnings
Rename globals to make sure it's clear they are globals.
9 years ago
Victor Julien 65d2443ccd reputation: fix -Wshadow warnings 9 years ago
Victor Julien d893bc55e0 eve-flow: fix -Wshadow warning 9 years ago
Victor Julien 9477fd4628 eve-file: fix -Wshadow warnings 9 years ago
Victor Julien ed0918bc35 ippair: fix -Wshadow warning 9 years ago
Victor Julien 5f786b5cd7 host: fix -Wshadow warning 9 years ago
Victor Julien 0c3b89356e flow: fix -Wshadow warning 9 years ago
Victor Julien 70452f67a4 within: fix -Wshadow warning 9 years ago
Victor Julien 47c4a8cd28 prefilter: fix -Wshadow warnings 9 years ago
Victor Julien f2f0f84cca detect: fix -Wshadow warning 9 years ago
Victor Julien 070a6caaf3 app engines: fix -Wshadow warning 9 years ago
Victor Julien 691fae6520 address: fix -Wshadow warning 9 years ago
Victor Julien 34b030b45f distance: fix -Wshadow warning 9 years ago
Victor Julien d50b4b8471 content: fix -Wshadow warning 9 years ago
Victor Julien 02df79f67b mem: fix SCStrdup -Wshadow warning 9 years ago
Victor Julien f97e857c02 dns: fix -Wshadow warnings 9 years ago
Victor Julien 6a971a5a02 app-layer-proto-detect: fix -Wshadow warning 9 years ago
Victor Julien 287fd83796 dnp3: fix coverity CID 1374300 9 years ago
Victor Julien 8915f2de38 flow: suppress coverity CID 400600 9 years ago
Victor Julien edcc8e7ec9 stat: suppress CID 1293508 and 1312013 9 years ago
Victor Julien 7021959689 nfq: suppress CID 1374302 and 1374303 9 years ago
Victor Julien da6bf0c1b6 host-info: coverity 1298890 9 years ago
Victor Julien 9904b3f348 ttl: coverity 400560 + minor cleanups 9 years ago
Victor Julien d30f7f6b48 tos: coverity 400559 9 years ago
Victor Julien ad8f9f9334 ssl-state: coverity 400558 9 years ago
Jason Ish c91974e24a issue 1961: depth: fail if numeric value has trailing text
Catches the case where the depth is not terminated with a
semicolon (eg: "depth:17 classtype:trojan-activity") which
is usually a sign the rule has a missing semi-colon.
9 years ago
Jason Ish a1eca40611 log-pcap.c: cleanup scan-build warning
Don't initialize value to a value that is never used.
9 years ago
Jason Ish 553f7ec290 log-pcap.c: fix resource leak found by coverity
Goto the failure label instead of returning which will allow the open
directory to get cleaned up.

Fixes:

*** CID 1394675:  Resource leaks  (RESOURCE_LEAK)
/src/log-pcap.c: 615 in PcapLogInitRingBuffer()
609                  * failure as the file might just not be a pcap log file. */
610                 continue;
611             }
612
613             PcapFileName *pf = SCCalloc(sizeof(*pf), 1);
614             if (unlikely(pf == NULL)) {
>>>     CID 1394675:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "dir" going out of scope leaks the storage it points to.
615                 return TM_ECODE_FAILED;
616             }
617             char path[PATH_MAX];
618             snprintf(path, PATH_MAX - 1, "%s/%s", pattern, entry->d_name);
619             if ((pf->filename = SCStrdup(path)) == NULL) {
620                 goto fail;

This also means that pf can be NULL which should clear up CID
1394676 (REVERSE_INULL).
9 years ago
Jason Ish 0c6c9784a2 doc: document that that ;, \, " need to be escaped in rules 9 years ago
Victor Julien a67c31d4e1 qa: appveyor support 9 years ago
Victor Julien e6ed0d815c qa: update url in libhtp script 9 years ago