From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) by sourceware.org (Postfix) with ESMTPS id A77733858C78 for ; Tue, 1 Mar 2022 19:30:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A77733858C78 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qv1-xf30.google.com with SMTP id fc19so17433236qvb.7 for ; Tue, 01 Mar 2022 11:30:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=+L+YdQTfweZpSK+m8p1e8OfNfzBYNVlsShEqkSowLeY=; b=Xz9Fi4/sdANevy7cejJwPu2VkLEpLdUbHDmw7ZB2NRANE5ejeVgno6/8KgBW0t4FeP e52yqEU+WeLRrHmJq4u2kpakIfYVf3hA1pYwOjDuWd+j3fwmjkfqTjKSxrUPXKScNhbv mXGTKd4AVBVA2EsdDMkgmXxognGNDLvKJp3Bi/iYubho1hxaZSJ6kpOqGAUTHjyQcBFR z4j6gZgxxGhuHQANoxC/6zYSzNprYbKRj+EeQ3hZfJxlHG/h9H1bPXSIcO3N4KHOWhgp ZoVEtllXSWwsaf/8e3D8aiNwZlAX+m0gu6jp4isG4II3MZrfSQ90qrFj4zxzQiOIgyX0 Y5kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=+L+YdQTfweZpSK+m8p1e8OfNfzBYNVlsShEqkSowLeY=; b=btO8nWvj09yTZXQA6XnBR5wH56PGME7+ybx5oBPrOhNbA+0jOQrtOq4HnbpSijeLp8 yIGxKwqMtxUJhYIMN3dPQ4skxSQC4XYuGhuoFNbnw1Fxmf0Ewj5X2t11iamI8LWkpx/F 5+JNi/I3vIReGNY+KfGVY6jGV8NvqL+NNWBmoDQCSdA9vZisTXQqiNdHGCzUwTYYVP/V DMCdksAaiTVXxrTrehVMPd4Lw+vt0wQNE3k4tQ4dfTBej4OTGiI27v6zzZ9BLQl0wdsP HmMM45q4dmiEK4XEi8uuBQfu5YdWmvX1w60U2bZP5tAq7LZvoJPrTcegHQ7k4hmKxq0Q sFAA== X-Gm-Message-State: AOAM531noHWra5Y5mKbzwuMV/JdcxCzm59PeqN54e2p4RgEt4DdLyy8k Llrn/6A59RZhiRifCeEgElOz5ZfY1dnVr1EBi+0Z02w= X-Google-Smtp-Source: ABdhPJyPjBV57OyZp74cVay/neZiwa/AaNOHVyC/XYnexpj/sOsJCgvFeLMS2dloNmSYM314ZU7AovovIRGVyqyykWA= X-Received: by 2002:ad4:4963:0:b0:432:304e:e50e with SMTP id p3-20020ad44963000000b00432304ee50emr18228709qvy.111.1646163046174; Tue, 01 Mar 2022 11:30:46 -0800 (PST) MIME-Version: 1.0 References: <621dbc6e5b779_bb4ce2b0cf36619a0847b1@prd-scan-dashboard-0.mail> In-Reply-To: From: C Howland Date: Tue, 1 Mar 2022 14:30:35 -0500 Message-ID: Subject: Re: New Defects reported by Coverity Scan for RTEMS-Newlib To: newlib@sourceware.org X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2022 19:30:48 -0000 > > ------------------------------ > *From:* Newlib on > behalf of Joel Sherrill > *Sent:* Tuesday, March 1, 2022 7:59 AM > *To:* Newlib > *Subject:* Fwd: New Defects reported by Coverity Scan for RTEMS-Newlib > > > > Hi > > The RTEMS Projects runs Coverity Scan when Newlib changes. > > Not sure who committed something that triggered these but overnight 6 new > defects showed up. Most look to be NULL dereferences. > > --joel > > ---------- Forwarded message --------- > From: > Date: Tue, Mar 1, 2022, 12:25 AM > Subject: New Defects reported by Coverity Scan for RTEMS-Newlib > To: > > > Hi, > > Please find the latest report on new defect(s) introduced to RTEMS-Newlib > found with Coverity Scan. > > 6 new defect(s) introduced to RTEMS-Newlib found with Coverity Scan. > > > New defect(s) Reported-by: Coverity Scan > Showing 6 of 6 defect(s) > > > ** CID 387497: (FORWARD_NULL) > > /home/joel/rtems-cron-coverity/sourceware-mirror-newlib-cygwin/newlib/libc/stdio/asiprintf.c: > 46 in _asiprintf_r() > > > > ________________________________________________________________________________________________________ > *** CID 387497: (FORWARD_NULL) > > /home/joel/rtems-cron-coverity/sourceware-mirror-newlib-cygwin/newlib/libc/stdio/asiprintf.c: > 46 in _asiprintf_r() > 40 f._file = -1; /* No file. */ > 41 va_start (ap, fmt); > 42 ret = _svfiprintf_r (ptr, &f, fmt, ap); > 43 va_end (ap); > 44 if (ret >= 0) > 45 { > >>> CID 387497: (FORWARD_NULL) > >>> Dereferencing null pointer "f._p". > 46 *f._p = 0; > 47 *strp = (char *) f._bf._base; > 48 } > 49 return (ret); > 50 } > 51 > Joel: In a quick look nothing related to these has changed. And looking specifically at this one complaint (which looks to be representative of all the rest), the complaint is spurious. The check for the return being >= 0 means that _p has been set by the called function. Craig