diff options
author | Schanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de> | 2018-01-08 07:58:33 +0100 |
---|---|---|
committer | Schanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de> | 2018-01-08 07:58:33 +0100 |
commit | 7ad94d1427d304483e9bf1cf1d12065f8e41d712 (patch) | |
tree | 573016db50a53b71487101245ffcaf38aab5a92a /src/credential/plugin_gnsrecord_credential.c | |
parent | cc5bb40d158b207c384ae98c868573771735f10a (diff) | |
download | gnunet-7ad94d1427d304483e9bf1cf1d12065f8e41d712.tar.gz gnunet-7ad94d1427d304483e9bf1cf1d12065f8e41d712.zip |
bugfixes
Diffstat (limited to 'src/credential/plugin_gnsrecord_credential.c')
-rw-r--r-- | src/credential/plugin_gnsrecord_credential.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/credential/plugin_gnsrecord_credential.c b/src/credential/plugin_gnsrecord_credential.c index 342790b7a..ffb2857dc 100644 --- a/src/credential/plugin_gnsrecord_credential.c +++ b/src/credential/plugin_gnsrecord_credential.c | |||
@@ -199,6 +199,13 @@ credential_string_to_value (void *cls, | |||
199 | GNUNET_free (tmp_str); | 199 | GNUNET_free (tmp_str); |
200 | tmp_str = GNUNET_strdup (s); | 200 | tmp_str = GNUNET_strdup (s); |
201 | token = strtok (tmp_str, ","); | 201 | token = strtok (tmp_str, ","); |
202 | if (NULL == token) | ||
203 | { | ||
204 | GNUNET_free (tmp_str); | ||
205 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
206 | "Malformed string %s\n", s); | ||
207 | return GNUNET_SYSERR; | ||
208 | } | ||
202 | struct GNUNET_CREDENTIAL_DelegationSet set[entries]; | 209 | struct GNUNET_CREDENTIAL_DelegationSet set[entries]; |
203 | for (i=0;i<entries;i++) | 210 | for (i=0;i<entries;i++) |
204 | { | 211 | { |
@@ -219,7 +226,10 @@ credential_string_to_value (void *cls, | |||
219 | set); | 226 | set); |
220 | 227 | ||
221 | if (-1 == tmp_data_size) | 228 | if (-1 == tmp_data_size) |
229 | { | ||
230 | GNUNET_free (tmp_str); | ||
222 | return GNUNET_SYSERR; | 231 | return GNUNET_SYSERR; |
232 | } | ||
223 | *data_size += tmp_data_size; | 233 | *data_size += tmp_data_size; |
224 | *data = sets = GNUNET_malloc (*data_size); | 234 | *data = sets = GNUNET_malloc (*data_size); |
225 | GNUNET_CREDENTIAL_delegation_set_serialize (entries, | 235 | GNUNET_CREDENTIAL_delegation_set_serialize (entries, |