BUILD: ssl/ckch: potential null pointer dereference

src/ssl_ckch.c: In function ‘ckch_conf_parse’:
src/ssl_ckch.c:4852:40: error: potential null pointer dereference [-Werror=null-dereference]
 4852 |                                 while (*r) {
      |                                        ^~

Add a test on r before using *r.

No backport needed
This commit is contained in:
William Lallemand 2025-04-02 10:02:07 +02:00
parent 2e8acf54d4
commit 31bd3627cd

View File

@ -4849,7 +4849,7 @@ int ckch_conf_parse(char **args, int cur_arg, struct ckch_conf *f, int *found, c
goto out; goto out;
array_err: array_err:
while (*r) { while (r && *r) {
char *prev = *r; char *prev = *r;
r++; r++;
free(prev); free(prev);