[squid-dev] [PATCH] Coverity fixes, part 3
Kinkie
gkinkie at gmail.com
Sun Jul 26 16:48:16 UTC 2015
HI,
the low-hanging fruits from Coverity's analysis have been picked, now
working on somewhat more complex fixes.
The attached patch takes a hint from two benign coverity defects to:
- rework the berEncodeLoginData error handling path to be more readable
- refactor Digest auth's field lookup table to use a std::map instead of
abusing httpHeaderFieldsInfo; this improves readability and size of the
code, and has the added small bonus of lowering the lookup cost from linear
to logarithmic
the Digest code has been run-tested. I'd like feedback on its style, as
httpHeaderFieldsInfo is abused similarly elswehere and I'm considering to
apply it elsewhere as well; it can then be further refined to get O(1) via
a carefully-chosen hash (via std::unsorted_map)
--
Francesco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20150726/a6b348cb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: coverity-fixes-3-v1.patch
Type: text/x-patch
Size: 12141 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20150726/a6b348cb/attachment.bin>
More information about the squid-dev
mailing list