public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: C Howland <cc1964t@gmail.com>
To: newlib@sourceware.org
Subject: Re: New Defects reported by Coverity Scan for RTEMS-Newlib
Date: Tue, 1 Mar 2022 14:30:35 -0500	[thread overview]
Message-ID: <CANk6obSkfNQuRMnJ7dttJBVp8QhrjL8OjD+DFGS9P3C4T0KLGQ@mail.gmail.com> (raw)
In-Reply-To: <BN2P110MB1544826C2DADD0A490C6E5E49A029@BN2P110MB1544.NAMP110.PROD.OUTLOOK.COM>

>
> ------------------------------
> *From:* Newlib <newlib-bounces+craig.howland=caci.com@sourceware.org> on
> behalf of Joel Sherrill <joel@rtems.org>
> *Sent:* Tuesday, March 1, 2022 7:59 AM
> *To:* Newlib <newlib@sourceware.org>
> *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: <scan-admin@coverity.com>
> Date: Tue, Mar 1, 2022, 12:25 AM
> Subject: New Defects reported by Coverity Scan for RTEMS-Newlib
> To: <joel.sherrill@gmail.com>
>
>
> 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

  parent reply	other threads:[~2022-03-01 19:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <621dbc6e5b779_bb4ce2b0cf36619a0847b1@prd-scan-dashboard-0.mail>
2022-03-01 12:59 ` Fwd: " Joel Sherrill
     [not found]   ` <BN2P110MB1544826C2DADD0A490C6E5E49A029@BN2P110MB1544.NAMP110.PROD.OUTLOOK.COM>
2022-03-01 19:30     ` C Howland [this message]
2022-03-01 20:43       ` Joel Sherrill
     [not found] <630d44245d07b_448622ac7e91099ac81e@prd-scan-dashboard-0.mail>
2022-08-29 23:09 ` Fwd: " Joel Sherrill
2022-08-30 19:03   ` Jeff Johnston
2022-08-30 19:03     ` Jeff Johnston
2022-08-31 19:16     ` Jeff Johnston
2022-08-31 19:16       ` Jeff Johnston
2022-08-31 19:58       ` Joel Sherrill
2022-08-31 19:58         ` Joel Sherrill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANk6obSkfNQuRMnJ7dttJBVp8QhrjL8OjD+DFGS9P3C4T0KLGQ@mail.gmail.com \
    --to=cc1964t@gmail.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).