fix NULL termination of fee list
This commit is contained in:
parent
40a64e8f0c
commit
8ebb4cda07
@ -167,8 +167,10 @@ parse_fees (json_t *fees)
|
|||||||
free_fees (fm);
|
free_fees (fm);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (idx < len)
|
if (idx + 1 < len)
|
||||||
wa->next = &fe->fee_list[idx + 1];
|
wa->next = &fe->fee_list[idx + 1];
|
||||||
|
else
|
||||||
|
wa->next = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fm;
|
return fm;
|
||||||
|
@ -76,6 +76,16 @@ sign_account_data (void *cls,
|
|||||||
JSON_INDENT(2));
|
JSON_INDENT(2));
|
||||||
json_decref (wire);
|
json_decref (wire);
|
||||||
GNUNET_assert (NULL != json_out);
|
GNUNET_assert (NULL != json_out);
|
||||||
|
if (GNUNET_OK !=
|
||||||
|
GNUNET_DISK_directory_create_for_file (ai->wire_response_filename))
|
||||||
|
{
|
||||||
|
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
|
||||||
|
"mkdir",
|
||||||
|
ai->wire_response_filename);
|
||||||
|
global_ret = 1;
|
||||||
|
free (json_out);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
out = fopen (ai->wire_response_filename,
|
out = fopen (ai->wire_response_filename,
|
||||||
"w+");
|
"w+");
|
||||||
@ -85,6 +95,7 @@ sign_account_data (void *cls,
|
|||||||
"fopen",
|
"fopen",
|
||||||
ai->wire_response_filename);
|
ai->wire_response_filename);
|
||||||
global_ret = 1;
|
global_ret = 1;
|
||||||
|
free (json_out);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fprintf (out,
|
fprintf (out,
|
||||||
|
Loading…
Reference in New Issue
Block a user