From: yasufum.o@gmail.com
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH] spp_nfv: fix buffer overflow
Date: Tue, 27 Aug 2019 12:45:28 +0900 [thread overview]
Message-ID: <20190827034528.5366-1-yasufum.o@gmail.com> (raw)
From: Yasufumi Ogawa <yasufum.o@gmail.com>
String `port_set` is used for containing a set of src and dst ports for
returned message. It is formatted as 39 chars as following, although its
buffer size is 32.
"{\"src\":\"%s:%d\",\"dst\":\"%s:%d\"}" // 39 chars
This update is to fix the bug by increasing buffer size to 128 which is
enough for the usage.
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
---
src/nfv/commands.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/nfv/commands.h b/src/nfv/commands.h
index 6eda72f..499bdd4 100644
--- a/src/nfv/commands.h
+++ b/src/nfv/commands.h
@@ -141,7 +141,7 @@ parse_command(char *str)
int max_token = 0;
int ret = 0;
char result[16] = { 0 }; /* succeeded or failed. */
- char port_set[32] = { 0 };
+ char port_set[128] = { 0 };
char *p_type;
int p_id;
--
2.17.1
reply other threads:[~2019-08-27 3:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190827034528.5366-1-yasufum.o@gmail.com \
--to=yasufum.o@gmail.com \
--cc=ferruh.yigit@intel.com \
--cc=spp@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).