Re: [HACKERS] Minor binary-search int overflow in timezone code

2014-12-18 Thread Christoph Berg
Re: Tom Lane 2014-12-16 <14615.1418694...@sss.pgh.pa.us> > Jim Nasby writes: > > On 12/15/14, 1:39 PM, Christoph Berg wrote: > >> Well, if it's not interesting, let's just forget it. Sorry. > > > At the risk of sticking my head in the lions mouth... this is the kind of > > response that deters p

Re: [HACKERS] Minor binary-search int overflow in timezone code

2014-12-15 Thread Tom Lane
Jim Nasby writes: > On 12/15/14, 1:39 PM, Christoph Berg wrote: >> Well, if it's not interesting, let's just forget it. Sorry. > At the risk of sticking my head in the lions mouth... this is the kind of > response that deters people from contributing anything to the project, > including reviewi

Re: [HACKERS] Minor binary-search int overflow in timezone code

2014-12-15 Thread Jim Nasby
On 12/15/14, 1:39 PM, Christoph Berg wrote: Re: Tom Lane 2014-12-15 <21813.1418655...@sss.pgh.pa.us> This is totally silly. The timecnt couldn't be anywhere near INT_MAX (in fact, it is not allowed to exceed TZ_MAX_TIMES, which is currently just 1200). And there are bunches of other instances

Re: [HACKERS] Minor binary-search int overflow in timezone code

2014-12-15 Thread Christoph Berg
Re: Tom Lane 2014-12-15 <21813.1418655...@sss.pgh.pa.us> > This is totally silly. The timecnt couldn't be anywhere near INT_MAX (in > fact, it is not allowed to exceed TZ_MAX_TIMES, which is currently just > 1200). And there are bunches of other instances of similar code in PG; > shall we put equ

Re: [HACKERS] Minor binary-search int overflow in timezone code

2014-12-15 Thread Tom Lane
Christoph Berg writes: > a fellow Debian Developer found a minor glitch in > src/timezone/localtime.c, where binary search is used. Now I don't > think there is an actual problem (unless there's > 2^30 timezones), > but it would at least make sense to mark the code as okayish so that > people runn

[HACKERS] Minor binary-search int overflow in timezone code

2014-12-15 Thread Christoph Berg
Hi, a fellow Debian Developer found a minor glitch in src/timezone/localtime.c, where binary search is used. Now I don't think there is an actual problem (unless there's > 2^30 timezones), but it would at least make sense to mark the code as okayish so that people running code scanners won't stumb