From 42b8c68addc8aed0a829b7678ef0ceefd47dc113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 26 Jul 2017 10:34:03 -0400 Subject: [PATCH] Fix segv in ca_remote_forget_chunk With gcc-7.1.1-6.fc27: In file included from ../src/caformat-util.h:7:0, from ../src/caremote.c:8: ../src/caremote.c: In function 'ca_remote_forget_chunk': ../src/util.h:471:13: error: argument 1 null where non-null expected [-Werror=nonnull] if (strncmp(s, prefix, l) == 0) ^~~~~~~~~~~~~~~~~~~~~ --- src/caremote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/caremote.c b/src/caremote.c index 7d49923980..755c3a6389 100644 --- a/src/caremote.c +++ b/src/caremote.c @@ -2729,7 +2729,7 @@ int ca_remote_forget_chunk(CaRemote *rr, const CaChunkID *id) { p = startswith(qpos, "low-priority/"); if (!p) { - p = startswith(p, "high-priority/"); + p = startswith(qpos, "high-priority/"); if (!p) { r = -EBADMSG; goto finish; -- 2.13.0