[Oisf-devel] detect-engine.c:336: Possible bad if test ?

David Binderman dcb314 at hotmail.com
Mon Oct 14 12:20:01 UTC 2013

hello there,

I recently ran the source code of suricata-1.4.6 through
the static analysis checker cppcheck.

It said

[detect-engine.c:336]: (warning) Logical conjunction always evaluates to false: alproto <= 0 && alproto>= 14.

Source code is

    if ((list == NULL) ||
        (alproto <= ALPROTO_UNKNOWN && alproto>= ALPROTO_FAILED) ||

Suggest swap && for ||


David Binderman 		 	   		  

More information about the Oisf-devel mailing list