diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-09-11 23:56:28 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-09-11 23:56:28 +0200 |
commit | 6759228b6010aaa70ddf153d15ace604328d4bf6 (patch) | |
tree | 599ad27bc2d08583c8d1cb0f818dc7ec9ca38b22 /src/backend/taler-merchant-httpd_private-post-account.c | |
parent | d0b27e71a71ab44058fb148754363c6fd2286dcf (diff) |
fix failure to initialize credit_facade details if DB had NULL values
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-account.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-account.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-account.c b/src/backend/taler-merchant-httpd_private-post-account.c index 6ad3902d..793e6c79 100644 --- a/src/backend/taler-merchant-httpd_private-post-account.c +++ b/src/backend/taler-merchant-httpd_private-post-account.c @@ -153,8 +153,10 @@ TMH_private_post_account (const struct TMH_RequestHandler *rh, ad.payto_uri) ) && ( (adx.credit_facade_credentials == ad.credit_facade_credentials) || - (1 == json_equal (adx.credit_facade_credentials, - ad.credit_facade_credentials)) ) && + ( (NULL != adx.credit_facade_credentials) && + (NULL != ad.credit_facade_credentials) && + (1 == json_equal (adx.credit_facade_credentials, + ad.credit_facade_credentials)) ) ) && ( (adx.credit_facade_url == ad.credit_facade_url) || ( (NULL != adx.credit_facade_url) && (NULL != ad.credit_facade_url) && @@ -165,10 +167,14 @@ TMH_private_post_account (const struct TMH_RequestHandler *rh, GNUNET_free (adx.payto_uri); return TALER_MHD_REPLY_JSON_PACK (connection, MHD_HTTP_OK, - GNUNET_JSON_pack_data_auto ("salt", - &adx.salt), - GNUNET_JSON_pack_data_auto ("h_wire", - &adx.h_wire)); + GNUNET_JSON_pack_data_auto ( + "salt", + &adx. + salt), + GNUNET_JSON_pack_data_auto ( + "h_wire", + &adx. + h_wire)); } break; case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: |