Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Aug 2018 22:19:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 230720] strptime() conversion and validation issues
Message-ID:  <bug-230720-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230720

            Bug ID: 230720
           Summary: strptime() conversion and validation issues
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: rlittle@inetco.com

Created attachment 196301
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D196301&action=
=3Dedit
Patch file for strptime.c

I've been running the FreeBSD strptime() function through a few tests and a=
 few
of things came up.

1) Some compile warnings were silenced by changing the type of len from int=
 to
size_t. Also some compiler-reported possibly uninitialized use, which I don=
't
think are really bugs but best to be safe.

2) %k and %l should allow preceding blanks. The current version requires all
digits and throws an error. I have put in a little fix to permit this.

3) %I and %l should generate an error on 0. A small check added for that.

4) %d should generate an error on 0. A small check added for that.

Patch attached.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-230720-227>