On Mon, Aug 23, 2021 at 03:09:03PM +0000, Debian Bug Tracking System wrote:
> This is an automatic notification regarding your Bug report
> which was filed against the src:mingw-w64 package:
> 
> #897196: CVE-2018-1000101
> 
> It has been closed by Vincent Lefevre <vinc...@vinc17.net>.
> 
> Their explanation is attached below along with your original report.
> If this explanation is unsatisfactory and you have not received a
> better one in a separate message then please contact Vincent Lefevre 
> <vinc...@vinc17.net> by
> replying to this email.
> 
> 
> -- 
> 948598: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=948598
> Debian Bug Tracking System
> Contact ow...@bugs.debian.org with problems

> Date: Mon, 23 Aug 2021 17:07:38 +0200
> From: Vincent Lefevre <vinc...@vinc17.net>
> To: 948598-d...@bugs.debian.org
> Subject: Re: mingw-w64-i686-dev: non-conforming snprintf function in case
>  of truncation
> User-Agent: Mutt/2.1.1+44 (02298c19) vl-138565 (2021-07-29)
> Message-ID: <20210823150738.gb11...@zira.vinc17.org>
> X-Mailer-Info: https://www.vinc17.net/mutt/
> 
> Version: 8.0.0-1
> 
> On 2020-01-10 17:53:40 +0100, Vincent Lefevre wrote:
> > Package: mingw-w64-i686-dev
> > Version: 7.0.0-2
> > Severity: normal
> > 
> > Consider the following program:
> > 
> > #include <stdio.h>
> > 
> > int main (void)
> > {
> >   char buf[8] = { 0 };
> >   int r;
> > 
> >   r = snprintf (buf, 3, "abcdef");
> >   printf ("r = %d, buf = \"%s\"\n", r, buf);
> > 
> >   return 0;
> > }
> > 
> > When compiling with i686-w64-mingw32-gcc and running under Wine,
> > I get:
> > 
> > r = -1, buf = "abc"
> > 
> > which is incorrect. Adding the -posix option when compiling solves
> > the issue, i.e. I get
> > 
> > r = 6, buf = "ab"
> > 
> > but the snprintf function is not specific to POSIX.
> 
> I could test that this was fixed in the current version (8.0.0-1).
> So, closing.
> 
> Note: the upstream bug has been closed today, but the bug was actually
> fixed last year and the fix is included upstream in v8.0.0.
> 
> Thanks to Pali Rohár for the fix and for the information.

Do you have a reference to the fix included in v8.0.0 upstream?

Regards,
Salvatore

Reply via email to