From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16240 invoked from network); 1 Jul 2020 13:12:29 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 1 Jul 2020 13:12:29 -0000 Received: (qmail 20324 invoked by uid 550); 1 Jul 2020 13:12:27 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 20294 invoked from network); 1 Jul 2020 13:12:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=hN0MfIK57W8zvlWGaFKXVGFBUykgpolshJGdOTK17pU=; b=lCZhbHT0Zk2Na07spfhQNG9NEoX0xV3XFEsJJDUwniH4vXn22nv2kddv5G1vZF58Fs S4Y47mB455JWJWkE7U/aZMjCL8T3FynBzy+zqS9lpuZCdmxkzWTiXcaOUVaN30xmwlvs 1mplI0lxPhZl6SsP5piYHeaOD4q+O5GGmiPyn4Gf6YUbXtw46sUiMkgcsVVSh/lbBZzg 6fcglgNdgGMMLIpAW/mdzc+EdQV4O/p5IeVEtHnww6O0qDJxvwbb5yZ+rVcgh4ul4qSr q0XmduW9ap9FHwnWwNbofHbYN5XkZLtdl3JILvTbad5sA7FI5+xbd+W6E+R6sR2RJ7jn Z+wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=hN0MfIK57W8zvlWGaFKXVGFBUykgpolshJGdOTK17pU=; b=QHvSbZFIzS2ypwEl89Ok0E0MyJvQ+Q8h709AE1Zf6LdhiUqYwIBnptAs+9FNRQWsF0 XBvTdcM+xHaU+t0yQaWKOgeUZyimyCA9CCIjieZWqjd1WWQ4xgIl/MwaylxfHa5YF8aC SUcDrlnw91A0/lYnDq9AfoA/lRNUOmrTmnG98dQMOTMa6SZVlmOQk6Mr0Mlayae+HVoF m/VZ6mxe1WzrBr/rvDfGTbV9RPdCRrHmwT3lnItbqW58JE8vwEPTq3nrN027KPb44C4F rmZgUyNn7Ur9r0P1gAMAcwvE54usOw1NvB/so5Xnwck3/oAWm0VcUptvg5W0H+x/LJND SsaA== X-Gm-Message-State: AOAM5320pXDsYNLPUKCGxORVFkLldsn43sQEB9UCcJysHIi7TgcKq8eO X8Zwc0N92XcfVxl2/X1I4MNdaCnM X-Google-Smtp-Source: ABdhPJwOFMqDa0mJ/F74qu956NNfSff3VdZ23m5SuQ6sKUBM0S6MpawWgPsmONw551YxO0JUpyzExw== X-Received: by 2002:a17:906:6446:: with SMTP id l6mr3870626ejn.184.1593609135199; Wed, 01 Jul 2020 06:12:15 -0700 (PDT) From: Julien Ramseier Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Message-Id: Date: Wed, 1 Jul 2020 15:12:14 +0200 To: musl@lists.openwall.com X-Mailer: Apple Mail (2.3445.104.11) Subject: [musl] [PATCH] vfscanf: fix use of uninitialized variable vfscanf() may use the variable 'alloc' uninitialized when taking the = branch introduced by recent commit b287cd745c2243f8e5114331763a5a9813b5f6ee. Spotted by clang: ../lib/libc/src/stdio/vfscanf.c:80:6: warning: variable 'alloc' is used = uninitialized whenever 'if' condition is true = [-Wsometimes-uninitialized] if (!f->rpos) goto input_fail; ^~~~~~~~ ../lib/libc/src/stdio/vfscanf.c:330:7: note: uninitialized use occurs = here if (alloc) { ^~~~~ --- src/stdio/vfscanf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stdio/vfscanf.c b/src/stdio/vfscanf.c index b5ebc16e..b78a374d 100644 --- a/src/stdio/vfscanf.c +++ b/src/stdio/vfscanf.c @@ -57,7 +57,7 @@ int vfscanf(FILE *restrict f, const char *restrict = fmt, va_list ap) { int width; int size; - int alloc; + int alloc =3D 0; int base; const unsigned char *p; int c, t; --=20 2.23.0=