diff options
author | Mattias Andrée <maandree@kth.se> | 2024-09-14 09:30:02 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-09-14 09:30:02 +0200 |
commit | b760899d77e10bff19a276facd799c2f531e8feb (patch) | |
tree | 8be704d4d4e7921c5883f95bf4226edcb7aa09fe | |
parent | Add libhashsum_init_keccak_hasher2.3 (diff) | |
download | libhashsum-b760899d77e10bff19a276facd799c2f531e8feb.tar.gz libhashsum-b760899d77e10bff19a276facd799c2f531e8feb.tar.bz2 libhashsum-b760899d77e10bff19a276facd799c2f531e8feb.tar.xz |
libhashsum_init_hasher_from_string: ignore SP after comma
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | libhashsum_init_hasher_from_string.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libhashsum_init_hasher_from_string.c b/libhashsum_init_hasher_from_string.c index 8ff5e44..652b206 100644 --- a/libhashsum_init_hasher_from_string.c +++ b/libhashsum_init_hasher_from_string.c @@ -92,6 +92,8 @@ keccak(int (*initfunc)(struct libhashsum_hasher *, const struct libhashsum_kecca break; if (*p++ != ',') goto einval; + while (*p == ' ') + p++; } if (p[1]) goto einval; @@ -256,6 +258,8 @@ next: if (*p == ',') { p++; + while (*p == ' ') + p++; goto next; } |