From ff85b728990b1c0b2e32b13c9118767fc95320b7 Mon Sep 17 00:00:00 2001 From: lda Date: Fri, 29 Mar 2024 11:48:25 -0500 Subject: [PATCH] Fix IPv6 issue in parser (#52) Fixes compilation issue in the parser (and checks IPv6 slightly more). --- Please review the developer certificate of origin: 1. The contribution was created in whole or in part by me, and I have the right to submit it under the open source licenses of the Telodendria project; or 1. The contribution is based upon a previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the Telodendria project license; or 1. The contribution was provided directly to me by some other person who certified (1), (2), or (3), and I have not modified it. 1. I understand and agree that this project and the contribution are made public and that a record of the contribution—including all personal information I submit with it—is maintained indefinitely and may be redistributed consistent with this project or the open source licenses involved. - [x] I have read the Telodendria Project development certificate of origin, and I certify that I have permission to submit this patch under the conditions specified in it. Co-authored-by: Jordan Bancino Reviewed-on: https://git.telodendria.io/Telodendria/Telodendria/pulls/52 Co-authored-by: lda Co-committed-by: lda --- src/Parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Parser.c b/src/Parser.c index f003b4c..705ea2c 100644 --- a/src/Parser.c +++ b/src/Parser.c @@ -152,7 +152,7 @@ ParseIPv6(char **str, char **out) goto fail; } - while ((c = Iterate(str)) && IsIPv6Char(c)) + while ((c = Iterate(str)) && IsIPv6Char(c) && digits < 8) { char *ipv4; if (isxdigit(c))