mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
Fix buffer overrun in guestfish command-line parsing.
This commit is contained in:
@@ -366,7 +366,7 @@ script (int prompt)
|
||||
goto next_command;
|
||||
}
|
||||
p[len] = '\0';
|
||||
pend = &p[len+2];
|
||||
pend = p[len+1] ? &p[len+2] : &p[len+1];
|
||||
} else if (*p == '\'') {
|
||||
p++;
|
||||
len = strcspn (p, "'");
|
||||
@@ -381,7 +381,7 @@ script (int prompt)
|
||||
goto next_command;
|
||||
}
|
||||
p[len] = '\0';
|
||||
pend = &p[len+2];
|
||||
pend = p[len+1] ? &p[len+2] : &p[len+1];
|
||||
/*
|
||||
} else if (*p == '[') {
|
||||
int c = 1;
|
||||
|
||||
Reference in New Issue
Block a user