On 6/30/17 08:13, Peter Eisentraut wrote:
> On 6/24/17 11:51, Tom Lane wrote:
>> Ah, I was about to suggest the same thing, but I was coming at it from
>> the standpoint of not requiring buffers several times larger than
>> necessary, which could in itself cause avoidable palloc failures.
>>
>> I w
On 6/24/17 11:51, Tom Lane wrote:
> Ah, I was about to suggest the same thing, but I was coming at it from
> the standpoint of not requiring buffers several times larger than
> necessary, which could in itself cause avoidable palloc failures.
>
> I was going to suggest a small variant actually: ru
On Sun, Jun 25, 2017 at 09:28:51PM -0700, Noah Misch wrote:
> On Sat, Jun 24, 2017 at 10:03:25AM -0400, Peter Eisentraut wrote:
> > On 6/23/17 12:31, Tom Lane wrote:
> > > icu_to_uchar() and icu_from_uchar(), and perhaps other places, are
> > > touchingly naive about integer overflow hazards in buf
On Sat, Jun 24, 2017 at 10:03:25AM -0400, Peter Eisentraut wrote:
> On 6/23/17 12:31, Tom Lane wrote:
> > icu_to_uchar() and icu_from_uchar(), and perhaps other places, are
> > touchingly naive about integer overflow hazards in buffer size
> > calculations. I call particular attention to this bit
Peter Eisentraut writes:
> On 6/23/17 12:31, Tom Lane wrote:
>> icu_to_uchar() and icu_from_uchar(), and perhaps other places, are
>> touchingly naive about integer overflow hazards in buffer size
>> calculations.
> Here is a patch that should address this.
Ah, I was about to suggest the same th
On 6/23/17 12:31, Tom Lane wrote:
> icu_to_uchar() and icu_from_uchar(), and perhaps other places, are
> touchingly naive about integer overflow hazards in buffer size
> calculations. I call particular attention to this bit in
> icu_from_uchar():
>
> len_result = UCNV_GET_MAX_BYTES_FOR_STRI
On Fri, Jun 23, 2017 at 12:31:40PM -0400, Tom Lane wrote:
> icu_to_uchar() and icu_from_uchar(), and perhaps other places, are
> touchingly naive about integer overflow hazards in buffer size
> calculations. I call particular attention to this bit in
> icu_from_uchar():
>
> len_result = UCN
icu_to_uchar() and icu_from_uchar(), and perhaps other places, are
touchingly naive about integer overflow hazards in buffer size
calculations. I call particular attention to this bit in
icu_from_uchar():
len_result = UCNV_GET_MAX_BYTES_FOR_STRING(len_uchar,
ucnv_getMaxCharSize(icu_conve