From: "Dooley, Brian" <brian.dooley@intel.com>
To: "Kusztal, ArkadiuszX" <arkadiuszx.kusztal@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "gakhil@marvell.com" <gakhil@marvell.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [PATCH] common/qat: fix incorrect size in the parser
Date: Wed, 19 Feb 2025 09:41:45 +0000 [thread overview]
Message-ID: <SJ0PR11MB50561E0071918CAB0166FE7B83C52@SJ0PR11MB5056.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20250207095832.4032332-1-arkadiuszx.kusztal@intel.com>
> -----Original Message-----
> From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Sent: Friday 7 February 2025 09:59
> To: dev@dpdk.org
> Cc: gakhil@marvell.com; Dooley, Brian <brian.dooley@intel.com>; Kusztal,
> ArkadiuszX <arkadiuszx.kusztal@intel.com>; stable@dpdk.org
> Subject: [PATCH] common/qat: fix incorrect size in the parser
>
> The function `strlen` returns the size of the string without a terminating null-
> character, therefore a request to allocate memory space for a parsed argument
> is too small by 1.
>
> Fixes: 99ab2806687b ("common/qat: isolate parser arguments
> configuration")
> Cc: stable@dpdk.org
>
> Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
> ---
> drivers/common/qat/qat_device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/common/qat/qat_device.c
> b/drivers/common/qat/qat_device.c index bca88fd9bd..746d8a28bb
> 100644
> --- a/drivers/common/qat/qat_device.c
> +++ b/drivers/common/qat/qat_device.c
> @@ -226,7 +226,7 @@ qat_dev_parse_command_line(struct qat_pci_device
> *qat_dev,
> if (!devargs)
> return 0;
>
> - len = strlen(devargs->drv_str);
> + len = strlen(devargs->drv_str) + 1;
> if (len == 0)
> return 0;
> /* Allocate per-device command line */
> --
> 2.34.1
Acked-by: Brian Dooley <brian.dooley@intel.com>
prev parent reply other threads:[~2025-02-19 9:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-07 9:58 Arkadiusz Kusztal
2025-02-19 9:41 ` Dooley, Brian [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SJ0PR11MB50561E0071918CAB0166FE7B83C52@SJ0PR11MB5056.namprd11.prod.outlook.com \
--to=brian.dooley@intel.com \
--cc=arkadiuszx.kusztal@intel.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).