diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2017-03-29 14:21:30 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2017-03-29 14:21:30 +0200 |
commit | 2b87f173e360aaf4a3bac3fbc6e5b4dc44cf58cd (patch) | |
tree | c39c08a3cbcdf13918856ff17216a4571be9b15a /src | |
parent | b95646624c640ac3f1ed74d5474b090f46af745c (diff) | |
download | gnunet-2b87f173e360aaf4a3bac3fbc6e5b4dc44cf58cd.tar.gz gnunet-2b87f173e360aaf4a3bac3fbc6e5b4dc44cf58cd.zip |
-fix coverity
Diffstat (limited to 'src')
-rw-r--r-- | src/gns/plugin_rest_gns.c | 1 | ||||
-rw-r--r-- | src/identity-provider/gnunet-service-identity-provider.c | 1 | ||||
-rw-r--r-- | src/identity-provider/plugin_rest_identity_provider.c | 3 | ||||
-rw-r--r-- | src/namestore/plugin_rest_namestore.c | 11 |
4 files changed, 11 insertions, 5 deletions
diff --git a/src/gns/plugin_rest_gns.c b/src/gns/plugin_rest_gns.c index 5d4734d9a..b7775e4ea 100644 --- a/src/gns/plugin_rest_gns.c +++ b/src/gns/plugin_rest_gns.c | |||
@@ -529,6 +529,7 @@ get_gns_cont (struct GNUNET_REST_RequestHandle *conndata_handle, | |||
529 | { | 529 | { |
530 | handle->pkey_str = GNUNET_CONTAINER_multihashmap_get (conndata_handle->url_param_map, | 530 | handle->pkey_str = GNUNET_CONTAINER_multihashmap_get (conndata_handle->url_param_map, |
531 | &key); | 531 | &key); |
532 | GNUNET_assert (NULL != handle->pkey_str); | ||
532 | if (GNUNET_OK != | 533 | if (GNUNET_OK != |
533 | GNUNET_CRYPTO_ecdsa_public_key_from_string (handle->pkey_str, | 534 | GNUNET_CRYPTO_ecdsa_public_key_from_string (handle->pkey_str, |
534 | strlen(handle->pkey_str), | 535 | strlen(handle->pkey_str), |
diff --git a/src/identity-provider/gnunet-service-identity-provider.c b/src/identity-provider/gnunet-service-identity-provider.c index 17c288368..53fd02c9f 100644 --- a/src/identity-provider/gnunet-service-identity-provider.c +++ b/src/identity-provider/gnunet-service-identity-provider.c | |||
@@ -442,6 +442,7 @@ handle_token_update (void *cls) | |||
442 | { | 442 | { |
443 | cur_value = GNUNET_CONTAINER_multihashmap_get (ego_entry->attr_map, | 443 | cur_value = GNUNET_CONTAINER_multihashmap_get (ego_entry->attr_map, |
444 | &key_hash); | 444 | &key_hash); |
445 | GNUNET_assert (NULL != cur_value); | ||
445 | GNUNET_CONTAINER_DLL_insert (new_token->attr_head, | 446 | GNUNET_CONTAINER_DLL_insert (new_token->attr_head, |
446 | new_token->attr_tail, | 447 | new_token->attr_tail, |
447 | cur_value); | 448 | cur_value); |
diff --git a/src/identity-provider/plugin_rest_identity_provider.c b/src/identity-provider/plugin_rest_identity_provider.c index e03f502ad..907b28ba9 100644 --- a/src/identity-provider/plugin_rest_identity_provider.c +++ b/src/identity-provider/plugin_rest_identity_provider.c | |||
@@ -580,6 +580,7 @@ issue_token_cont (struct GNUNET_REST_RequestHandle *con, | |||
580 | } | 580 | } |
581 | nonce_str = GNUNET_CONTAINER_multihashmap_get (handle->conndata_handle->url_param_map, | 581 | nonce_str = GNUNET_CONTAINER_multihashmap_get (handle->conndata_handle->url_param_map, |
582 | &key); | 582 | &key); |
583 | GNUNET_assert (NULL != nonce_str); | ||
583 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 584 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
584 | "Request nonce: %s\n", | 585 | "Request nonce: %s\n", |
585 | nonce_str); | 586 | nonce_str); |
@@ -794,6 +795,7 @@ list_token_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
794 | } | 795 | } |
795 | ego_val = GNUNET_CONTAINER_multihashmap_get (handle->conndata_handle->url_param_map, | 796 | ego_val = GNUNET_CONTAINER_multihashmap_get (handle->conndata_handle->url_param_map, |
796 | &key); | 797 | &key); |
798 | GNUNET_assert (NULL != ego_val); | ||
797 | //Remove non-matching egos | 799 | //Remove non-matching egos |
798 | for (ego_entry = handle->ego_head; | 800 | for (ego_entry = handle->ego_head; |
799 | NULL != ego_entry;) | 801 | NULL != ego_entry;) |
@@ -866,6 +868,7 @@ exchange_cont (void *cls, | |||
866 | } | 868 | } |
867 | nonce_str = GNUNET_CONTAINER_multihashmap_get (handle->conndata_handle->url_param_map, | 869 | nonce_str = GNUNET_CONTAINER_multihashmap_get (handle->conndata_handle->url_param_map, |
868 | &key); | 870 | &key); |
871 | GNUNET_assert (NULL != nonce_str); | ||
869 | GNUNET_assert (1 == sscanf (nonce_str, "%"SCNu64, &expected_nonce)); | 872 | GNUNET_assert (1 == sscanf (nonce_str, "%"SCNu64, &expected_nonce)); |
870 | 873 | ||
871 | if (ticket_nonce != expected_nonce) | 874 | if (ticket_nonce != expected_nonce) |
diff --git a/src/namestore/plugin_rest_namestore.c b/src/namestore/plugin_rest_namestore.c index 0d36cf445..50957a5b4 100644 --- a/src/namestore/plugin_rest_namestore.c +++ b/src/namestore/plugin_rest_namestore.c | |||
@@ -899,10 +899,11 @@ namestore_zkey_cont (struct GNUNET_REST_RequestHandle *con, | |||
899 | } | 899 | } |
900 | handle->zkey_str = GNUNET_CONTAINER_multihashmap_get (handle->rest_handle->url_param_map, | 900 | handle->zkey_str = GNUNET_CONTAINER_multihashmap_get (handle->rest_handle->url_param_map, |
901 | &key); | 901 | &key); |
902 | if (GNUNET_OK != | 902 | if ((NULL == handle->zkey_str) || |
903 | GNUNET_CRYPTO_ecdsa_public_key_from_string (handle->zkey_str, | 903 | (GNUNET_OK != |
904 | GNUNET_CRYPTO_ecdsa_public_key_from_string (handle->zkey_str, | ||
904 | strlen (handle->zkey_str), | 905 | strlen (handle->zkey_str), |
905 | &pubkey)) | 906 | &pubkey))) |
906 | { | 907 | { |
907 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 908 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
908 | "Zkey invalid %s\n", handle->zkey_str); | 909 | "Zkey invalid %s\n", handle->zkey_str); |
@@ -1126,8 +1127,8 @@ rest_identity_process_request(struct GNUNET_REST_RequestHandle *rest_handle, | |||
1126 | { | 1127 | { |
1127 | type = GNUNET_CONTAINER_multihashmap_get (handle->rest_handle->url_param_map, | 1128 | type = GNUNET_CONTAINER_multihashmap_get (handle->rest_handle->url_param_map, |
1128 | &key); | 1129 | &key); |
1129 | 1130 | if (NULL != type) | |
1130 | handle->type = GNUNET_GNSRECORD_typename_to_number (type); | 1131 | handle->type = GNUNET_GNSRECORD_typename_to_number (type); |
1131 | } | 1132 | } |
1132 | name = get_name_from_url (handle->url); | 1133 | name = get_name_from_url (handle->url); |
1133 | if (NULL != ego) | 1134 | if (NULL != ego) |