Skip to content

Commit

Permalink
Fix Uninitialized Headers Struct (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks authored Aug 11, 2022
1 parent a814a19 commit e30c9ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/msh3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ enum H3SettingsType {
// Contiguous buffer for (non-null-terminated) header name and value strings.
struct H3HeadingPair : public lsxpack_header_t {
char Buffer[512] = {0};
H3HeadingPair() { memset(this, 0, sizeof(lsxpack_header_t)); }
bool Set(const MSH3_HEADER* Header) {
if (Header->NameLength + Header->ValueLength > sizeof(Buffer)) return false;
buf = Buffer;
Expand Down

0 comments on commit e30c9ce

Please sign in to comment.