From b760899d77e10bff19a276facd799c2f531e8feb Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 14 Sep 2024 09:30:02 +0200 Subject: libhashsum_init_hasher_from_string: ignore SP after comma MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libhashsum_init_hasher_from_string.c | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- cgit v1.2.3-70-g09d2