Fix overflow at return wchar2char (src/backend/utils/adt/pg_locale.c) - Mailing list pgsql-hackers

From Ranier Vilela
Subject Fix overflow at return wchar2char (src/backend/utils/adt/pg_locale.c)
Date
Msg-id CAEudQAq5JFG88GCdgTkwrxRKT+T6RFjtXx8jberaOfAUzNOwdA@mail.gmail.com
Whole thread Raw
Responses Re: Fix overflow at return wchar2char (src/backend/utils/adt/pg_locale.c)
List pgsql-hackers
Hi,

1. wchar2char has a mistake when checking the return of WideCharToMultiByte call.
result variable is unsigned, therefore, cannot be less than zero, returning -1 is not an option.

2. strftime or strftime_win32, return cannot be less than zero.

3. If strftime or strftime_win32, fails, why not abort the loop?

regards,
Ranier Vilela
Attachment

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: TDE (Transparent Data Encryption) supported ?
Next
From: Amit Langote
Date:
Subject: Re: problem with RETURNING and update row movement