qubes-restore: ensure we don't read outside the buffer
Marek says the 20 offset was there for a previous Xen save file format, and is no longer needed.
This commit is contained in:
parent
ed24d8bc75
commit
f3850b7a71
@ -218,7 +218,7 @@ char *get_vmname_from_savefile(int fd)
|
||||
exit(1);
|
||||
}
|
||||
buf[buflen] = 0;
|
||||
name = strstr(buf + 20, NAME_PATTERN);
|
||||
name = strstr(buf, NAME_PATTERN);
|
||||
if (!name) {
|
||||
fprintf(stderr,
|
||||
"cannot find 'volatile.img' in savefile\n");
|
||||
|
Loading…
Reference in New Issue
Block a user