mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
Ignore storage volumes with control codes in their names
To prevent generating invalid XML. https://bugzilla.redhat.com/show_bug.cgi?id=1066564
This commit is contained in:
parent
557107500b
commit
60db2bc80f
@ -860,6 +860,12 @@ virStorageBackendFileSystemRefresh(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
while ((direrr = virDirRead(dir, &ent, pool->def->target.path)) > 0) {
|
||||
int ret;
|
||||
|
||||
if (virStringHasControlChars(ent->d_name)) {
|
||||
VIR_WARN("Ignoring file with control characters under '%s'",
|
||||
pool->def->target.path);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (VIR_ALLOC(vol) < 0)
|
||||
goto error;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user