On Thu, Dec 6, 2012 at 11:01 AM, Jiri Kosina wrote:
>> > - count = ihid->inbuf[0] | (ihid->inbuf[1] << 8);
>> > + ret_count = ihid->inbuf[0] | (ihid->inbuf[1] << 8);
>> >
>> > + if (!ret_count)
>>
>> I'd make this (ret_count <= 2), as this would let you call memcpy with a
>> null or even
On Thu, Dec 6, 2012 at 11:01 AM, Jiri Kosina jkos...@suse.cz wrote:
- count = ihid-inbuf[0] | (ihid-inbuf[1] 8);
+ ret_count = ihid-inbuf[0] | (ihid-inbuf[1] 8);
+ if (!ret_count)
I'd make this (ret_count = 2), as this would let you call memcpy with a
null or even negative
On Wed, 5 Dec 2012, Jean Delvare wrote:
> > The previous memcpy implementation relied on the size advertized by the
> > device. There were no guarantees that buf was big enough.
> >
> > Some gymnastic is also required with the +2/-2 to take into account
> > the first 2 bytes of the returned
On Wed, 5 Dec 2012, Jean Delvare wrote:
The previous memcpy implementation relied on the size advertized by the
device. There were no guarantees that buf was big enough.
Some gymnastic is also required with the +2/-2 to take into account
the first 2 bytes of the returned buffer where
On Wed, 5 Dec 2012 15:02:56 +0100, Benjamin Tissoires wrote:
> The previous memcpy implementation relied on the size advertized by the
> device. There were no guarantees that buf was big enough.
>
> Some gymnastic is also required with the +2/-2 to take into account
> the first 2 bytes of the
On Wed, 5 Dec 2012 15:02:56 +0100, Benjamin Tissoires wrote:
The previous memcpy implementation relied on the size advertized by the
device. There were no guarantees that buf was big enough.
Some gymnastic is also required with the +2/-2 to take into account
the first 2 bytes of the
6 matches
Mail list logo