check iban lower bound

This commit is contained in:
Sebastian 2021-08-09 13:36:02 -03:00
parent c9d94e55bd
commit 617da7485c
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1

View File

@ -359,6 +359,8 @@ validate_iban (const char *iban)
unsigned int j;
len = strlen (iban);
if (len < 4)
return GNUNET_strdup ("IBAN number too short to be valid");
if (len > 34)
return GNUNET_strdup ("IBAN number too long to be valid");
memcpy (cc, iban, 2);