Skip to content

Commit

Permalink
opack: Fixed 32bit buffer overflow
Browse files Browse the repository at this point in the history
Thanks to @cornejo for spotting this!
  • Loading branch information
nikias committed Nov 10, 2023
1 parent 214bafd commit e314faa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/opack.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ static void opack_encode_node(plist_t node, struct char_buf* cbuf)
if (len >> 32) {
uint8_t blen = 0x94;
char_buf_append(cbuf, 1, &blen);
uint32_t u64val = htole64(len);
uint64_t u64val = htole64(len);
char_buf_append(cbuf, 8, (unsigned char*)&u64val);
} else {
uint8_t blen = 0x93;
Expand Down

0 comments on commit e314faa

Please sign in to comment.