Skip to content

Commit

Permalink
Reject hexadecimal blobs with odd number of characters, fixes #12650.
Browse files Browse the repository at this point in the history
Changes in 4e75f84 to allow ignoring
non-hexa characters (such as whitespace) have also allowed dangling
hex digits, which were then padded with an implicit 0. This restores
the original behaviour of throwing an exception for these inputs.
  • Loading branch information
miodvallat committed Dec 2, 2024
1 parent 803699e commit 44d407c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pdns/rcpgenerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,7 @@ static void HEXDecode(const char* begin, const char* end, string& out)
}
}
if(mode)
out.append(1, (char) val);

throw RecordTextException("Hexadecimal blob with odd number of characters");
}

void RecordTextReader::xfrHexBlob(string& val, bool keepReading)
Expand Down

0 comments on commit 44d407c

Please sign in to comment.