tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: snprintf(3) behaviour regarding large "n"
In article <20140929201300.a8ENWnx3%sdaoden%yandex.com@localhost>,
Steffen Nurpmeso <sdaoden%yandex.com@localhost> wrote:
>And, finally:
>
> |Log Message:
> |Return EOVERFLOW like FreeBSD does if the buffer size exceeds INT_MAX
> |(well FreeBSD documents INT_MAX + 1, but in the code it is INT_MAX).
>
>hm, ok, yes S-nail without the fix doesn't print the Message-Id:
>even on FreeBSD, but at least the buffer is terminated at [0] and
>thus no binary garbage is printed when the buffer is printed.
>Ciao,
I am not sure if it is a good idea to touch the buffer when returning
an error.
christos
Home |
Main Index |
Thread Index |
Old Index