Re: [PATCH v4 1/4] xen-livepatch: fix parameter name parsing

2024-04-25 Thread Ross Lagerwall
On Wed, Apr 24, 2024 at 9:20 AM Roger Pau Monne wrote: > > It's incorrect to restrict strncmp to the length of the command line input > parameter, as then a user passing a rune like: > > % xen-livepatch up foo.livepatch > > Would match against the "upload" command, because the string comparison

Re: [PATCH v4 1/4] xen-livepatch: fix parameter name parsing

2024-04-24 Thread Anthony PERARD
On Wed, Apr 24, 2024 at 10:19:54AM +0200, Roger Pau Monne wrote: > It's incorrect to restrict strncmp to the length of the command line input > parameter, as then a user passing a rune like: > > % xen-livepatch up foo.livepatch > > Would match against the "upload" command, because the string

[PATCH v4 1/4] xen-livepatch: fix parameter name parsing

2024-04-24 Thread Roger Pau Monne
It's incorrect to restrict strncmp to the length of the command line input parameter, as then a user passing a rune like: % xen-livepatch up foo.livepatch Would match against the "upload" command, because the string comparison has been truncated to the length of the input argument. Use strcmp