Skip to content

Commit 6d3b65a

Browse files
committed
Fix buffer overflow
1 parent 7e6c3da commit 6d3b65a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/slipstream_server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ ssize_t server_decode(void* slot_p, void* callback_ctx, unsigned char** dest_buf
169169
}
170170

171171
// copy the subdomain from name to a new buffer
172-
char data_buf[data_len];
172+
char data_buf[data_len + 1];
173173
memcpy(data_buf, question->name, data_len);
174174
data_buf[data_len] = '\0';
175175
const size_t encoded_len = slipstream_inline_undotify(data_buf, data_len);

0 commit comments

Comments
 (0)