RE: [PATCH 1/3] libusbg: Fix readlink/buffer overrun issue. CID#56130, CID#56129

2014-05-13 Thread Krzysztof Opasiak
Hi, > -Original Message- > From: Philippe De Swert [mailto:philippedesw...@gmail.com] > > You mean something like this? > > diff --git a/src/usbg.c b/src/usbg.c > index 521513d..3774a6d 100644 > --- a/src/usbg.c > +++ b/src/usbg.c > @@ -843,14 +843,14 @@ static int > usbg_parse_config_bi

Re: [PATCH 1/3] libusbg: Fix readlink/buffer overrun issue. CID#56130, CID#56129

2014-05-13 Thread Philippe De Swert
Hi, On 12/05/14 09:52, Krzysztof Opasiak wrote: I agree that there was a possible off-by-one-error and thank you for catching this I have missed it, but maybe it is not the best solution? When you put '\0' sign to target[nmb-1] you are solving off by one problem but you always lose the last sign

RE: [PATCH 1/3] libusbg: Fix readlink/buffer overrun issue. CID#56130, CID#56129

2014-05-11 Thread Krzysztof Opasiak
Hi, > -Original Message- > From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb- > ow...@vger.kernel.org] On Behalf Of philippedesw...@gmail.com > Sent: Friday, May 09, 2014 2:51 PM > To: philippedesw...@gmail.com; linux-usb@vger.kernel.org; > mpor...@linaro.org > Cc: Philippe De Swert