Re: [PATCH iproute2] utils: don't match empty strings as prefixes

2019-07-15 Thread Stephen Hemminger
On Sun, 14 Jul 2019 16:57:54 +0200 Matteo Croce wrote: > On Wed, Jul 10, 2019 at 1:18 AM Matteo Croce wrote: > > > > On Tue, Jul 9, 2019 at 11:38 PM Stephen Hemminger > > wrote: > > > > > > On Tue, 9 Jul 2019 22:40:40 +0200 > > > Matteo Croce wrote: > > > > > > > iproute has an utility fu

Re: [PATCH iproute2] utils: don't match empty strings as prefixes

2019-07-14 Thread Matteo Croce
On Wed, Jul 10, 2019 at 1:18 AM Matteo Croce wrote: > > On Tue, Jul 9, 2019 at 11:38 PM Stephen Hemminger > wrote: > > > > On Tue, 9 Jul 2019 22:40:40 +0200 > > Matteo Croce wrote: > > > > > iproute has an utility function which checks if a string is a prefix for > > > another one, to allow use

Re: [PATCH iproute2] utils: don't match empty strings as prefixes

2019-07-09 Thread Matteo Croce
On Tue, Jul 9, 2019 at 11:38 PM Stephen Hemminger wrote: > > On Tue, 9 Jul 2019 22:40:40 +0200 > Matteo Croce wrote: > > > iproute has an utility function which checks if a string is a prefix for > > another one, to allow use of abbreviated commands, e.g. 'addr' or 'a' > > instead of 'address'.

Re: [PATCH iproute2] utils: don't match empty strings as prefixes

2019-07-09 Thread Stephen Hemminger
On Tue, 9 Jul 2019 22:40:40 +0200 Matteo Croce wrote: > iproute has an utility function which checks if a string is a prefix for > another one, to allow use of abbreviated commands, e.g. 'addr' or 'a' > instead of 'address'. > > This routine unfortunately considers an empty string as prefix > o

[PATCH iproute2] utils: don't match empty strings as prefixes

2019-07-09 Thread Matteo Croce
iproute has an utility function which checks if a string is a prefix for another one, to allow use of abbreviated commands, e.g. 'addr' or 'a' instead of 'address'. This routine unfortunately considers an empty string as prefix of any pattern, leading to undefined behaviour when an empty argument