mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-01-03 13:07:24 +00:00
Fixed a bug that copied without considering the length of xmlChar
This commit is contained in:
parent
72a9f40f3f
commit
7892eee207
@ -52,7 +52,10 @@ static bool GetXmlNsUrl(xmlDocPtr doc, std::string& nsurl)
|
|||||||
xmlNsPtr* nslist = xmlGetNsList(doc, pRootNode);
|
xmlNsPtr* nslist = xmlGetNsList(doc, pRootNode);
|
||||||
if(nslist){
|
if(nslist){
|
||||||
if(nslist[0] && nslist[0]->href){
|
if(nslist[0] && nslist[0]->href){
|
||||||
strNs = (const char*)(nslist[0]->href);
|
int len = xmlStrlen(nslist[0]->href);
|
||||||
|
if(0 < len){
|
||||||
|
strNs = std::string((const char*)(nslist[0]->href), len);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
S3FS_XMLFREE(nslist);
|
S3FS_XMLFREE(nslist);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user