Florian Weimer <fweimer@redhat.com> writes:
> Do you care about the snprintf behavior on very large buffers (larger
> than INT_MAX)? Then there's further complication, and it's an area
> where glibc behavior is likely to change in the future (because it is
> claimed that C99 and POSIX conflict, and glibc implements neither behavior).
We do not. Note that the buffer enlargement behavior is designed not to
let "len" exceed INT_MAX; it'll say "out of memory" instead.
Given that vsnprintf is defined to return int, buffers larger than INT_MAX
would be a real can of worms, one that we'd best not open.
regards, tom lane