From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH v2] fix integer overflow of tm_year in __secs_to_tm
Date: Mon, 7 Nov 2016 12:09:48 -0500 [thread overview]
Message-ID: <20161107170948.GF1555@brightrain.aerifal.cx> (raw)
In-Reply-To: <20161103022936.13564-1-dsabogalcc@gmail.com>
On Wed, Nov 02, 2016 at 10:29:36PM -0400, Daniel Sabogal wrote:
> From: Daniel Sabogal <dsabogal@ufl.edu>
>
> the overflow check for years+100 did not account for the extra
> year computed from the remaining months. instead, perform this
> check after obtaining the final number of years.
> ---
> v2: Subtract 12 from months, not 10.
Thanks. I almost accepted the old patch with the error. Maybe in the
future consider including a test case with the patch.
I don't want to make testcases a prerequisite for bug fixes because
that leads to bugs going unfixed for a long time, but perhaps for
obscure issues like this unlikely to be hit in real-world use, it
would be good to strongly encourage submission of test cases with
patches.
Rich
next prev parent reply other threads:[~2016-11-07 17:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 2:29 Daniel Sabogal
2016-11-07 17:09 ` Rich Felker [this message]
2016-11-08 3:40 ` Daniel Sabogal
2016-11-08 3:57 ` Rich Felker
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=20161107170948.GF1555@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).