Hi Sergey, Thanks for the review. Please find the attached updated patch. Do review it and let me know in case of any comments.
Thanks, Neel Patel On Wed, Feb 24, 2021 at 5:12 PM Sergey Burladyan <eshkin...@gmail.com> wrote: > Sergey Burladyan <eshkin...@gmail.com> writes: > > > Maybe it should look something like this: > > + wcstombs_s(&charsConverted, mbs, mb_len + 1, wchar_str, mb_len); > > Ah, and we missed check for error. > > Something like this, maybe: > +#ifdef __WIN32__ > + size_t charsConverted = 0; > + if (wcstombs_s(&charsConverted, mbs, mb_len + 1, wchar_str, > mb_len) != 0) { > + delete [] mbs; > + return NULL; > + } > +#else > > -- > Sergey Burladyan >
pgagent_unicode_v2.patch
Description: Binary data