| Summary: | valgrind claims memcpy overlap in CSSPropertyParser.cpp | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Milan Crha <mcrha> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | ap, bugs-noreply, calvaris, mcatanzaro |
| Priority: | P2 | ||
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
|
Description
Milan Crha
2018-07-09 07:59:44 PDT
This is memmove, not memcpy, so the source and destination are allowed to overlap.... Do you mean this had been addressed after 2.20.3 release already? That would be fine then. No, the code in question didn't change for the last couple years.
if (isAppleLegacyCssValueKeyword(buffer, length) || hasPrefix(buffer, length, "-khtml-")) {
memmove(buffer + 7, buffer + 6, length + 1 - 6); // This is line 184
memcpy(buffer, "-webkit", 7);
++length;
}
This seems to be a valgrind bug. I see the memmove() definition in glibc calls GCC's __builtin___memmove_chk(). valgrind seems to be intercepting that with __memcpy_chk rather than __memmove_chk like it should be... dunno how that's going wrong. I would report this to the valgrind developers and allow them to figure it out. |