Skip to content

util: do not silently truncate

Marc-André Lureau requested to merge elmarco/libslirp:slirp-fmt-truncate into master

snprintf() always nul-terminate.

The return value is the number of business bytes that would be produced if the buffer was large enough.

If it returns N for a N size buffer, it means truncation occurred (and we lost one business byte).

Related to: #22

Merge request reports

Loading