Skip to content
Snippets Groups Projects
Commit 53ff91a5 authored by Alexandre Janniaux's avatar Alexandre Janniaux Committed by Jean-Baptiste Kempf
Browse files

stream_out: dlna: replace sprintf by iostream

Although the usage is fine in DLNA because the input is controlled and
sized, sprintf is considered dangerous and is now deprecated on MacOSX,
leading to warnings. In addition, this is C++ code which is already
using ostringstream to serialize the DLNA info, and it was only using
sprintf there for the sized part of the DLNA info.

The DLNA info must match with:
 - DNLA.ORG_OP is 2 character-wide 0-padded
 - DNLA.ORG_FLAGS is 32 character-wide 0-padded.

Use std::setfill and then set the appropriate width for each fields in
the info, directly into the DLNA ostringstream used to serialize the
whole string.
parent d14929e8
No related branches found
No related tags found
Loading
Pipeline #314688 passed with stage
in 23 minutes and 34 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment