summaryrefslogtreecommitdiff
path: root/src/backend/anastasis-httpd_truth_upload.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/anastasis-httpd_truth_upload.c')
-rw-r--r--src/backend/anastasis-httpd_truth_upload.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/backend/anastasis-httpd_truth_upload.c b/src/backend/anastasis-httpd_truth_upload.c
index 451054f..0fb9017 100644
--- a/src/backend/anastasis-httpd_truth_upload.c
+++ b/src/backend/anastasis-httpd_truth_upload.c
@@ -522,7 +522,7 @@ AH_handler_truth_post (
struct ANASTASIS_CRYPTO_EncryptedKeyShareP keyshare_data;
void *encrypted_truth;
size_t encrypted_truth_size;
- const char *truth_mime = "";
+ const char *truth_mime = NULL;
const char *type;
enum GNUNET_DB_QueryStatus qs;
uint32_t storage_years;
@@ -594,10 +594,12 @@ AH_handler_truth_post (
if (NULL != long_poll_timeout_ms)
{
unsigned int timeout;
+ char dummy;
if (1 != sscanf (long_poll_timeout_ms,
- "%u",
- &timeout))
+ "%u%c",
+ &timeout,
+ &dummy))
{
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
@@ -779,7 +781,9 @@ AH_handler_truth_post (
qs = db->store_truth (db->cls,
truth_uuid,
&keyshare_data,
- truth_mime,
+ (NULL == truth_mime)
+ ? ""
+ : truth_mime,
encrypted_truth,
encrypted_truth_size,
type,