libceph: directly skip to the end of redirect reply
authorIlya Dryomov <idryomov@gmail.com>
Fri, 30 Aug 2019 15:38:31 +0000 (17:38 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 30 Mar 2020 10:42:41 +0000 (12:42 +0200)
Coverity complains about a double write to *p.  Don't bother with
osd_instructions and directly skip to the end of redirect reply.

Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/osd_client.c

index f9ec6a6..998e26b 100644 (file)
@@ -3483,9 +3483,6 @@ static int ceph_redirect_decode(void **p, void *end,
                goto e_inval;
        }
 
-       len = ceph_decode_32(p);
-       *p += len; /* skip osd_instructions */
-
        /* skip the rest */
        *p = struct_end;
 out: