|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V2] libxl/xl: implement support for guest iooprt and irq permissions
Ian Campbell writes ("[PATCH V2] libxl/xl: implement support for guest iooprt
and irq permissions"):
> libxl/xl: implement support for guest iooprt and irq permissions.
...>
> - int e;
> + int i, e;
...
> + ul = strtoul(buf, &ep, 16);
> + if (ep == buf) {
> + fprintf(stderr, "xl: Invalid argument parsing ioport: %s\n",
> + buf);
> + exit(1);
> + }
> + if (ul > UINT32_MAX) {
> + fprintf(stderr, "xl: ioport %lx too big\n", ul);
> + exit(1);
> + }
1. If long and int are the same size, this still mishandles
"1100000055\0", passing -1 to libxl.
2. You compare to UINT32_MAX and then assign to a signed integer.
That seems odd.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |