On 03/11/2015 07:05 PM, Bryce Harrington wrote:
In any case, may as well check for error return from snprintf (i.e. name_size < 0).
snprintf returns the number of bytes that would be needed, so truncation is indicated by returning a value greater than the size of the buffer.
(yes a whole lot of old versions of Unix and Windows got this wrong, but I don't think Wayland ports to them anyway...)
_______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel