Skip to content

Commit e30c9ce

Browse files
authored
Fix Uninitialized Headers Struct (#58)
1 parent a814a19 commit e30c9ce

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/msh3.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ enum H3SettingsType {
5252
// Contiguous buffer for (non-null-terminated) header name and value strings.
5353
struct H3HeadingPair : public lsxpack_header_t {
5454
char Buffer[512] = {0};
55+
H3HeadingPair() { memset(this, 0, sizeof(lsxpack_header_t)); }
5556
bool Set(const MSH3_HEADER* Header) {
5657
if (Header->NameLength + Header->ValueLength > sizeof(Buffer)) return false;
5758
buf = Buffer;

0 commit comments

Comments
 (0)