mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
xmlinterface.cpp: avoid unterminated strings
Signed-off-by: MarkusVolk <f_l_k@t-online.de>
Origin commit data
------------------
Branch: ni/coolstream
Commit: 2d93a4385d
Author: Markus Volk <f_l_k@t-online.de>
Date: 2020-01-14 (Tue, 14 Jan 2020)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -311,8 +311,8 @@ xmlDocPtr parseXmlFile(const char * filename, bool,const char* encoding)
|
||||
|
||||
size_t read_size = gzread(xmlgz_file,buffer,gzsize);
|
||||
|
||||
char utf8[3];
|
||||
strncpy(utf8,(char *)buffer,3);
|
||||
char utf8[4];
|
||||
strncpy(utf8,(char *)buffer,sizeof(utf8)-1);
|
||||
if ((utf8[0] == 0xef) && (utf8[1] == 0xbb) && (utf8[2] == 0xbf))
|
||||
enc = pugi::encoding_utf8;
|
||||
|
||||
|
Reference in New Issue
Block a user