qubes-restore: fix buffer overflow in command line building

This commit is contained in:
Vincent Penquerc'h 2013-12-30 09:12:32 -05:00 committed by Marek Marczykowski-Górecki
parent 95c76e071e
commit 8c7a5e5933

View File

@ -170,7 +170,7 @@ void start_guid(int domid, int argc, char **argv)
{
int i;
char dstr[40];
char *guid_args[argc + 1];
char *guid_args[argc + 4];
snprintf(dstr, sizeof(dstr), "%d", domid);
guid_args[0] = "qubes-guid";
guid_args[1] = "-d";