__str2flags bug with fix attached

Justin Mayfield jmayfield at cradlepoint.com
Wed May 9 23:08:30 EDT 2012


I found a minor bug in __str2flags where empty strings or short strings 
will match all or many flags respectively.  Basically the test needs to 
ensure the test string is the same length as the table entry before 
doing a strncasecmp to avoid doing just a prefix test.

Attached is a fix I'm using.

Cheers,
Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20120509/6baffd22/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: perfect_flags.patch
Type: text/x-patch
Size: 444 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20120509/6baffd22/attachment.bin>


More information about the libnl mailing list