]> git.ipfire.org Git - thirdparty/FORT-validator.git/commitdiff
Patch bad enclosing in conditional
authorAlberto Leiva Popper <ydahhrk@gmail.com>
Thu, 3 Apr 2025 23:18:42 +0000 (17:18 -0600)
committerAlberto Leiva Popper <ydahhrk@gmail.com>
Thu, 3 Apr 2025 23:18:42 +0000 (17:18 -0600)
src/rrdp.c

index 2c06f8078ee9293d2da484a314c13405c6e8289a..81e7c300f496931f34d08b977335df6f9ba94d84 100644 (file)
@@ -1480,7 +1480,7 @@ json2files(json_t *jparent, char *parent, struct rrdp_state *state)
                // XXX sanitize more
 
                path = json_string_value(jvalue);
-               if (strncmp(path, parent, parent_len || path[parent_len] != '/') != 0) {
+               if (strncmp(path, parent, parent_len) != 0 || path[parent_len] != '/') {
                        pr_op_warn("RRDP path '%s' is not child of '%s'.",
                            path, parent);
                        continue;