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

2019-07-15 Thread Stephen Hemminger
On Mon, 15 Jul 2019 20:04:30 +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 v2] utils: don't match empty strings as prefixes

2019-07-15 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