Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 7 Nov 2016 12:09:48 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [PATCH v2] fix integer overflow of tm_year in __secs_to_tm

On Wed, Nov 02, 2016 at 10:29:36PM -0400, Daniel Sabogal wrote:
> From: Daniel Sabogal <dsabogal@....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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.