Skip to content
Snippets Groups Projects
Commit 619d59a2 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

doesn't try to allocate negative size mappings any more

Rev: src/encode.c:1.16
parent 22385653
No related branches found
No related tags found
No related merge requests found
......@@ -437,7 +437,11 @@ static void decode_value2(struct decode_data *data)
case T_MAPPING:
{
struct mapping *m=allocate_mapping(num);
struct mapping *m;
if(num<0)
error("Failed to decode string. (mapping size is negative)\n");
m=allocate_mapping(num);
tmp.type=T_MAPPING;
tmp.u.mapping=m;
mapping_insert(data->decoded, & data->counter, &tmp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment