[FFmpeg-devel] [PATCH]Add one CRLF to http headers if necessary

Derek Buitenhuis derek.buitenhuis at gmail.com
Thu Feb 26 15:31:39 CET 2015

On 2/26/2015 2:09 PM, Carl Eugen Hoyos wrote:
> +            snprintf(header, len + 3, "%s\r\n", s->headers);

This does not necessarily work on windows. The C standard idctates that in
text mode, \n is translated to the system's native newline.

Use memcpy and 0x0D / 0X0A / 0x00.

This may also accidentally allow for headers to end with '\n\r\n',
wouldn't it?

- Derek

More information about the ffmpeg-devel mailing list