Valgrind error report:
Invalid read of size 1
at strcasecmp
by String::caseCmp(char const*) const
by HttpHeader::getByNameIfPresent(char const*, int, String&)
by HttpHeader::getByNameIfPresent(SBuf const&, String&)
by HttpHeader::getByName(SBuf const&) const
by assembleVaryKey(String&, SBuf&, HttpRequest const&)
...
The bug is probably not specific to Vary assembly and may have been
present since r14285 (gperf perfect hash refactoring).
/* Sorry, an unknown header name. Do linear search */
bool found = false;
while ((e = getEntry(&pos))) {
- if (e->id == Http::HdrType::OTHER && e->name.caseCmp(name) == 0) {
+ if (e->id == Http::HdrType::OTHER && e->name.caseCmp(name, namelen) == 0) {
found = true;
strListAdd(&result, e->value.termedBuf(), ',');
}