freebsd-ports/multimedia/vdr-plugin-upnp/files/patch-strncpy
Juergen Lock ccc7f468f6 http://www.vdr-wiki.de/wiki/index.php/Upnp-plugin
UPnP/DLNA Plugin for Video Disk Recorder

This Plugins extends the VDR with the possibility to act as an UPnP/DLNA Media
Server (DMS). It will serve VDR's contents in the network to any UPnP-AV and
DLNA capable devices.

This still is an alpha version!

WWW: http://upnp.vdr-developer.org/
2011-03-26 19:21:08 +00:00

12 lines
442 B
Text

--- a/misc/util.cpp
+++ b/misc/util.cpp
@@ -485,7 +519,8 @@ IXML_Element* ixmlAddProperty(IXML_Docum
char tvalue[UPNP_MAX_METADATA_LENGTH];
// trim the value to max metadata size
if(value){
- strncpy(tvalue, value, UPNP_MAX_METADATA_LENGTH);
+ strncpy(tvalue, value, UPNP_MAX_METADATA_LENGTH - 1);
+ tvalue[UPNP_MAX_METADATA_LENGTH - 1] = '\0';
}
const char* attribute = att(upnpproperty);