Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: NTop: Misc

Possible bug in nprobe util.c compileTemplate?

 

 

NTop misc RSS feed   Index | Next | Previous | View Threaded


ice799 at gmail

Jun 14, 2011, 1:20 PM

Post #1 of 1 (313 views)
Permalink
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
Attachments: if-fix.diff (0.88 KB)

NTop misc RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.