From: Stephen Hemminger > Sent: 23 July 2019 18:54 > > On Tue, 23 Jul 2019 13:25:37 +0200 > Jiri Pirko <j...@resnulli.us> wrote: > > > From: Jiri Pirko <j...@mellanox.com> > > > > One cannot depend on *argv being null in case of no arg is left on the > > command line. For example in batch mode, this is not always true. Check > > argc instead to prevent crash.
Hmmm... expecting the increments of argv and decrements of argc to match it probably wishful thinking.... A lot of parsers don't even look at argc. > Actually makeargs does NULL terminate the last arg so what input > to batchmode is breaking this? The 'usual' problem is an extra increment of argv because the last entry was something that 'eats' two or more entries. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)