gcc 11.x fixes 97/26497/2 12.90.1 12.91.0 12.92.0 12.93.0 13.93.0 marlin/12.90.1 marlin/12.91.0 marlin/12.92.0 marlin/12.93.0 marlin_12.90.1 marlin_12.91.0 marlin_12.92.0 marlin_12.93.0 needlefish/13.93.0 needlefish_13.93.0
authorScott Murray <scott.murray@konsulko.com>
Mon, 12 Jul 2021 20:03:56 +0000 (16:03 -0400)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 13 Jul 2021 21:11:17 +0000 (21:11 +0000)
In decode_base64 in wrap-json.c, initialize u16 as gcc now seems to
miss that it will be initialized on the first loop iteration.

Bug-AGL: SPEC-3819

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Ic4a1a87ec64bd725d5a3f6e2d2a3901348b608f6

wrap-json.c

index 0e0c31c..68dfe52 100644 (file)
@@ -200,7 +200,7 @@ static int decode_base64(
                size_t *decodedlen,
                int url)
 {
-       uint16_t u16;
+       uint16_t u16 = 0;
        uint8_t u8, *result;
        size_t in, out, iin;
        char c;