Re: [PATCH] usb: gadget: ether: Fix MAC address parsing

2015-04-28 Thread Felipe Balbi
On Tue, Apr 28, 2015 at 07:28:21PM +0200, Stefan Agner wrote: > On 2015-04-28 18:31, Felipe Balbi wrote: > > On Tue, Apr 28, 2015 at 06:15:51PM +0200, Krzysztof Opasiak wrote: > >> On 04/28/2015 05:59 PM, Stefan Agner wrote: > >> >On 2015-04-28 17:00, Krzysztof Opasiak wrote: > >> >>Hi Stefan, > >>

Re: [PATCH] usb: gadget: ether: Fix MAC address parsing

2015-04-28 Thread Stefan Agner
On 2015-04-28 18:31, Felipe Balbi wrote: > On Tue, Apr 28, 2015 at 06:15:51PM +0200, Krzysztof Opasiak wrote: >> On 04/28/2015 05:59 PM, Stefan Agner wrote: >> >On 2015-04-28 17:00, Krzysztof Opasiak wrote: >> >>Hi Stefan, >> >> >> >>On 04/28/2015 01:51 PM, Stefan Agner wrote: >> >>>MAC addresses c

Re: [PATCH] usb: gadget: ether: Fix MAC address parsing

2015-04-28 Thread Felipe Balbi
On Tue, Apr 28, 2015 at 06:15:51PM +0200, Krzysztof Opasiak wrote: > > > On 04/28/2015 05:59 PM, Stefan Agner wrote: > >On 2015-04-28 17:00, Krzysztof Opasiak wrote: > >>Hi Stefan, > >> > >>On 04/28/2015 01:51 PM, Stefan Agner wrote: > >>>MAC addresses can be written without leading zeros. A popu

Re: [PATCH] usb: gadget: ether: Fix MAC address parsing

2015-04-28 Thread Krzysztof Opasiak
On 04/28/2015 05:59 PM, Stefan Agner wrote: On 2015-04-28 17:00, Krzysztof Opasiak wrote: Hi Stefan, On 04/28/2015 01:51 PM, Stefan Agner wrote: MAC addresses can be written without leading zeros. A popular example is libc's ether_ntoa_r function which creates such MAC addresses. Example: 0

Re: [PATCH] usb: gadget: ether: Fix MAC address parsing

2015-04-28 Thread Stefan Agner
On 2015-04-28 17:00, Krzysztof Opasiak wrote: > Hi Stefan, > > On 04/28/2015 01:51 PM, Stefan Agner wrote: >> MAC addresses can be written without leading zeros. A popular >> example is libc's ether_ntoa_r function which creates such >> MAC addresses. >> >> Example: >> 00:14:3d:0f:ff:fe can be wri

Re: [PATCH] usb: gadget: ether: Fix MAC address parsing

2015-04-28 Thread Krzysztof Opasiak
Hi Stefan, On 04/28/2015 01:51 PM, Stefan Agner wrote: MAC addresses can be written without leading zeros. A popular example is libc's ether_ntoa_r function which creates such MAC addresses. Example: 00:14:3d:0f:ff:fe can be written as 0:14:3d:f:ff:fe Additionally, get_ether_addr potentially p

[PATCH] usb: gadget: ether: Fix MAC address parsing

2015-04-28 Thread Stefan Agner
MAC addresses can be written without leading zeros. A popular example is libc's ether_ntoa_r function which creates such MAC addresses. Example: 00:14:3d:0f:ff:fe can be written as 0:14:3d:f:ff:fe Additionally, get_ether_addr potentially parsed past the end of the user provided string. Use the op

Re: [PATCH] usb: gadget: ether: Fix MAC address parsing

2015-04-28 Thread Stefan Agner
Hi Krzysztof, On 2015-04-27 11:42, Krzysztof Opasiak wrote: > MAC address is often written without leading zeros. > > Example: > 00:14:3d:0f:ff:fe can be written as 0:14:3d:f:ff:fe > > Convention of skipping leading zeros is used in libc. > enther_ntoa_r() generates MAC address without leading >

[PATCH] usb: gadget: ether: Fix MAC address parsing

2015-04-27 Thread Krzysztof Opasiak
MAC address is often written without leading zeros. Example: 00:14:3d:0f:ff:fe can be written as 0:14:3d:f:ff:fe Convention of skipping leading zeros is used in libc. enther_ntoa_r() generates MAC address without leading zeros. Fix get_ether_addr() to correctly parse MAC address with and without