Hi,
On 2018-09-27 17:34:54 -0700, Andres Freund wrote:
> On 2018-09-27 20:18:12 -0400, Tom Lane wrote:
> > > /* Handle +/- */
> > > if (dosign && adjust_sign((value < 0), forcesign, &signvalue);
> > > uvalue = -(uint64) value;
> > > else
> > > uvalue = (uint64) value;
> >
Hi,
On 2018-09-27 20:18:12 -0400, Tom Lane wrote:
> Andres Freund writes:
> > I just noticed, while reviewing a patch that corrects overflow handing
> > in snprintf, that we don't correctly handle INT64_MIN in snprintf.c:
>
> Well, you still get the right answer, even if the "-value" is
> nomina
Andres Freund writes:
> I just noticed, while reviewing a patch that corrects overflow handing
> in snprintf, that we don't correctly handle INT64_MIN in snprintf.c:
Well, you still get the right answer, even if the "-value" is
nominally undefined.
> I suspect the best way to fix this, would be
Hi,
I just noticed, while reviewing a patch that corrects overflow handing
in snprintf, that we don't correctly handle INT64_MIN in snprintf.c:
static void
fmtint(int64 value, char type, int forcesign, int leftjust,
int minlen, int zpad, int precision, int pointflag,
PrintfT