mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
fixes strncpy & buf size
Origin commit data
------------------
Commit: 7359504dd7
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-08-07 (Tue, 07 Aug 2012)
Origin message was:
------------------
-fixes strncpy & buf size
This commit is contained in:
@@ -83,7 +83,7 @@ bool CMovieInfo::convertTs2XmlName(char *char_filename, int size)
|
||||
bool result = false;
|
||||
std::string filename = char_filename;
|
||||
if (convertTs2XmlName(&filename) == true) {
|
||||
strncpy(char_filename, filename.c_str(), size);
|
||||
strncpy(char_filename, filename.c_str(), size-1);
|
||||
char_filename[size - 1] = 0;
|
||||
result = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user