Commit 598d9946 authored by Thomas Schmitt's avatar Thomas Schmitt

Corrected some bugs with attribute list decoding

parent aac9c231
......@@ -1258,9 +1258,10 @@ int aaip_decode_attrs(struct aaip_state **handle, char aa_name[2],
{
int ret, was_non_aa= 0;
struct aaip_state *aaip;
size_t h_num, *h_lengths, i, new_mem;
size_t h_num, *h_lengths, i, new_mem, pair_consumed= 0;
char **h_names, **h_values;
*consumed= 0;
if(flag & (1 << 15)) {
if(*handle == NULL)
return(0);
......@@ -1327,10 +1328,11 @@ int aaip_decode_attrs(struct aaip_state **handle, char aa_name[2],
ret= aaip->list_pending_pair;
aaip->list_pending_pair= 0;
} else {
ret= aaip_decode_pair(aaip, data, num_data, consumed,
ret= aaip_decode_pair(aaip, data, num_data, &pair_consumed,
aaip->name_buf, aaip->name_buf_size, &aaip->name_buf_fill,
aaip->value_buf, aaip->value_buf_size, &aaip->value_buf_fill,
1);
*consumed+= pair_consumed;
}
if(ret == -2) { /* insufficient result_size */
if(aaip->first_is_name)
......@@ -1393,6 +1395,7 @@ int aaip_decode_attrs(struct aaip_state **handle, char aa_name[2],
aaip->list_num_attrs++;
aaip->name_buf_fill= aaip->value_buf_fill= 0;
ret= aaip->list_pending_pair;
aaip->list_pending_pair= 0;
if(ret == 2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment