Skip to content
This repository has been archived by the owner on Jul 2, 2022. It is now read-only.

cjson_decode: properly pass destination buffer size to uncompress #39

Merged
merged 1 commit into from
Jun 30, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions server.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ static json_t *cjson_decode(void *buf, size_t buflen)
obj_unc = malloc(unc_len + 1);
if (!obj_unc)
return NULL;
dest_len = unc_len;

/* decompress buffer (excluding first 32 bits) */
comp_p = buf + 4;
Expand Down