[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Xen-users] Xen 4.2 TODO (io and irq parameter are not evaluated by xl)
On Fri, 2012-08-31 at 16:57 +0100, Ian Jackson wrote: > Ian Campbell writes ("Re: [Xen-users] Xen 4.2 TODO (io and irq parameter are > not evaluated by xl)"): > > On Fri, 2012-08-31 at 16:13 +0100, Ian Jackson wrote: > > > This code fails to properly handle (reject) > > > - (*ep!=0 && *ep!='-') > > > > Oops, will fix. > > > > > - value > LONG_MAX > > > - INT_MAX < value <= LONG_MAX > > > > These all get checked inside the (eventual) hypercall. Or were you > > thinking of something else? > > Suppose buf contains "1100000055\0". > > If a long is 32-bit, strtoul will return ULONG_MAX (0xffffffffUL) > setting errno to ERANGE. Converting that to a 32-bit signed int will > do something implementation-defined (C99 6.3.1.3(3)) - in reality, > give -1. Relying on this being rejected later seems poor practice. The target variable here is an unsigned 32-bit int though. > If a long is 64-bit and an int 32-bit, strtoul will return > 0x1100000055UL. Converting that to a 32-bit int will again do > something implementation-defined - in reality, give 0x55. I've added checks for this and posted as V2. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |