> -----Original Message-----
> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Anoob Joseph
> Sent: Monday, March 11, 2019 5:56 AM
> To: Akhil Goyal <akhil.go...@nxp.com>; Doherty, Declan 
> <declan.dohe...@intel.com>; De Lara Guarch,
> Pablo <pablo.de.lara.gua...@intel.com>
> Cc: Anoob Joseph <ano...@marvell.com>; Ankur Dwivedi <adwiv...@marvell.com>; 
> Jerin Jacob
> Kollanukkaran <jer...@marvell.com>; Narayana Prasad Raju Athreya 
> <pathr...@marvell.com>; Suheil
> Chandran <schand...@marvell.com>; dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v2] lib/cryptodev: fix driver name comparison
> 
> The string compare to the length of driver name might give false
> positives when there are drivers with similar names (one being the
> subset of another).
> 
> Following is such a naming which could result in false positive.
> 1. crypto_driver
> 2. crypto_driver1
> 
> When strncmp with len = strlen("crypto_driver") is done, it could give
> a false positive when compared against "crypto_driver1". For such cases,
> 'strlen + 1' is done, so that the NULL termination also would be
> considered for the comparison.
> 
> Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto 
> devices")
> 
> Signed-off-by: Ankur Dwivedi <adwiv...@marvell.com>
> Signed-off-by: Anoob Joseph <ano...@marvell.com>
Acked-by: Fiona Trahe <fiona.tr...@intel.com>

Reply via email to