Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Thank you!
Andrew Novikov <as.asaw@gmail.com>
Andrew Tridgell
Andrey <rybakovandrey85@gmail.com>
Andrey Kolesnik <akolesnik@astralinux.ru>
Andrey Shorin <tolsty@tushino.com>
Ankor <ankor2023@gmail.com>
Anonymous <bigparrot@pirateperfection.com>
Expand Down
4 changes: 2 additions & 2 deletions src/wccp2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1142,9 +1142,9 @@ static size_t
CheckFieldDataLength(const FieldHeader *header, const size_t dataLength, const void *areaStart, const size_t areaSize, const char *error)
{
assert(header);
const auto dataStart = reinterpret_cast<const char*>(header) + sizeof(header);
const auto dataStart = reinterpret_cast<const char*>(header) + sizeof(*header);
CheckSectionLength(dataStart, dataLength, areaStart, areaSize, error);
return sizeof(header) + dataLength; // no overflow after CheckSectionLength()
return sizeof(*header) + dataLength; // no overflow after CheckSectionLength()
}

/// Positions the given field at a given start within a given packet area.
Expand Down
Loading