On 10/22/2013 11:06 PM, Tom Lane wrote:

Attached is a draft, which compiles though I've not yet actually tested it.


        nprinted = vsnprintf(buf, len, fmt, args);

        Assert(buf[len - 1] == '\0');

The assert may fire if len > INT_MAX and the system returns with errno == EOVERFLOW, as required by POSIX. It's probably better to move it after the error logging.

--
Florian Weimer / Red Hat Product Security Team


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to