-handle NULL nicely

This commit is contained in:
Christian Grothoff 2021-08-23 08:31:01 +02:00
parent 8590e6b309
commit bbce483ba0
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -226,6 +226,8 @@ TALER_iban_validate (const char *iban)
unsigned int i;
unsigned int j;
if (NULL == iban)
return GNUNET_strdup ("(null) is not a valid IBAN");
len = strlen (iban);
if (len < 4)
return GNUNET_strdup ("IBAN number too short to be valid");