mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 23:13:13 +02:00
xmlinterface.cpp: avoid unterminated strings
Signed-off-by: MarkusVolk <f_l_k@t-online.de>
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