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.
Loading
Please register or sign in to comment