Mailing List Archive

Possible bug in nprobe util.c compileTemplate?
Hi -

I am looking at the nprobe 6.5.0 source code and noticed the large if
statement in compileTemplate. This specific piece:

(strncmp(ver9_templates[i].ipfixElementName, element,
strlen(ver9_templates[i].ipfixElementName)) == 0)

If the ipfixElementName is the empty string, then the strlen of
ipfixElementName is 0, and strncmp returns 0 even though element and
ipfixElementName don't match.

I'm hesitant to make this already extremely large if statement any
larger, but I've attached a patch that corrects this issue.

Joe