Skip to content

Commit 90a96fd

Browse files
committed
set a zero char right after attrib value instead of memset
1 parent c054705 commit 90a96fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/browser/mime.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ pub const Mime = struct {
123123

124124
const attribute_value = try parseCharset(value);
125125
@memcpy(charset[0..attribute_value.len], attribute_value);
126-
// Fill the rest with zeroes.
127-
@memset(charset[attribute_value.len..], 0);
126+
// Null-terminate right after attribute value.
127+
charset[attribute_value.len] = 0;
128128
},
129129
}
130130
}

0 commit comments

Comments
 (0)