> -----Original Message-----
> From: Ferruh Yigit <ferruh.yi...@intel.com>
> Sent: Tuesday, October 22, 2019 6:33 PM
> To: Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)
> <jgraj...@cisco.com>; dev@dpdk.org
> Cc: step...@networkplumber.org
> Subject: Re: [dpdk-dev] [PATCH] net/memif: fix invalid unix domain address
> length
> 
> On 10/22/2019 5:08 PM, Jakub Grajciar wrote:
> > Define MEMIF_SOCKET_UN_SIZE to size of unix domain socket address.
> > Report error in case of longer path.
> >
> > Fixes: b923866c6974 ("net/memif: allow for full key size in socket
> > name")
> > Cc: step...@networkplumber.org
> >
> > Signed-off-by: Jakub Grajciar <jgraj...@cisco.com>
> 
> <...>
> 
> > +  if (strlen(filename) != MEMIF_SOCKET_UN_SIZE) {
> > +           MIF_LOG(ERR, "Unix socket address too long (max 108).");
> > +           return -1;
> > +   }
> 
> Are you sure about this check, I didn't test it but intention looks like ">=".

Thanks, I'll fix that in next version.

> 
> btw, it is possible to print 'MEMIF_SOCKET_UN_SIZE' as max value, instead of
> hardcoded '108'.

Reply via email to