[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Qemu-devel] [PATCH 2/4] Add access control support toqemu-bridge-he
From: |
Krumme, Chris |
Subject: |
RE: [Qemu-devel] [PATCH 2/4] Add access control support toqemu-bridge-helper |
Date: |
Wed, 4 Nov 2009 06:37:58 -0800 |
Hello Anthony,
> -----Original Message-----
> From: Anthony Liguori [mailto:address@hidden
> Sent: Wednesday, November 04, 2009 8:23 AM
> To: Krumme, Chris
> Cc: address@hidden; Mark McLoughlin; Arnd Bergmann;
> Michael Tsirkin; Juan Quintela; Dustin Kirkland
> Subject: Re: [Qemu-devel] [PATCH 2/4] Add access control
> support toqemu-bridge-helper
>
> Krumme, Chris wrote:
> > Hello Anthony,
> >
> > Cool patch series.
> >
>
> Thanks.
>
> >> + cmd = ptr;
> >> + arg = strchr(cmd, ' ');
> >> + if (arg == NULL) {
> >> + arg = strchr(cmd, '\t');
> >> + }
> >> +
> >> + if (arg == NULL) {
> >> + fprintf(stderr, "Invalid config line:\n %s\n", line);
> >> + fclose(f);
> >> + errno = EINVAL;
> >> + return -1;
> >> + }
> >> +
> >> + *arg = 0;
> >>
> >
> > No check is made for arg being in bounds.
> >
>
> I don't get it. arg is either going to be NULL (no ' ' or
> '\t' found in
> the string) or it will point to the first ' ' or '\t' in the
> string. It
My concern is that the first space or tab may not be in the first
sizeof(line) characters.
Thanks
Chris
> will always be in bound in this second case and the first case is
> handled by the if().
>
> Regards,
>
> Anthony Liguori
>