aboutsummaryrefslogtreecommitdiffstats
path: root/libhashsum_init_hasher_from_string.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-09-14 09:30:02 +0200
committerMattias Andrée <maandree@kth.se>2024-09-14 09:30:02 +0200
commitb760899d77e10bff19a276facd799c2f531e8feb (patch)
tree8be704d4d4e7921c5883f95bf4226edcb7aa09fe /libhashsum_init_hasher_from_string.c
parentAdd libhashsum_init_keccak_hasher2.3 (diff)
downloadlibhashsum-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>
Diffstat (limited to 'libhashsum_init_hasher_from_string.c')
-rw-r--r--libhashsum_init_hasher_from_string.c4
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;
}