Skip to content
Snippets Groups Projects
Commit a496700b authored by Andy Green's avatar Andy Green
Browse files

lws_snprintf

Thanks to Fabrice Gilot for reporting the problem that led to uncovering this.

Due to a misunderstanding of the return value of snprintf (it is not truncated according
to the max size passed in) in several places relying on snprintf to truncate the length
overflows are possible.

This patch wraps snprintf with a new lws_snprintf() which does truncate its length to allow
the buffer limiting scheme to work properly.

All users should update with these fixes.
parent c15714f3
No related branches found
No related tags found
No related merge requests found
Showing
with 274 additions and 174 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment