]> git.puffer.fish Git - matthieu/frr.git/commitdiff
nhrpd: uninitialized variable (Clang scan)
authorF. Aragon <paco@voltanet.io>
Fri, 29 Jun 2018 14:51:08 +0000 (16:51 +0200)
committerF. Aragon <paco@voltanet.io>
Fri, 29 Jun 2018 15:40:45 +0000 (17:40 +0200)
This correction fixes two bugs detected by Clang scan:

Bug Group: Logic error
Bug Type: Assigned value is garbage or undefined
File: nhrpd/vici.c
Function: vici_parse_message
Lines: 100, 105

Signed-off-by: F. Aragon <paco@voltanet.io>
nhrpd/vici.c

index e6111f9d7120e618f6a0c3471e8694bb2c482374..3bb0d8308ecbb94c1574eadbf57e7ca486985883 100644 (file)
@@ -287,6 +287,7 @@ static void vici_recv_sa(struct vici_conn *vici, struct zbuf *msg, int event)
        char buf[32];
        struct handle_sa_ctx ctx = {
                .event = event,
+               .msgctx.nsections = 0
        };
 
        vici_parse_message(vici, msg, parse_sa_message, &ctx.msgctx);