From: Roman Korynkevych <romanx.korynkevych@intel.com>
To: dev@dpdk.org
Cc: harry.van.haaren@intel.com, maryam.tahhan@intel.com,
Roman Korynkevych <romanx.korynkevych@intel.com>,
stable@dpdk.org
Subject: [dpdk-stable] [PATCH v1 1/1] app/procinfo: buffer null termination fix.
Date: Fri, 21 Apr 2017 16:06:36 +0100 [thread overview]
Message-ID: <1492787196-9101-1-git-send-email-romanx.korynkevych@intel.com> (raw)
Coverity issue: 143252
Fixes: 2deb6b5246d7706448d070335b329d1acb754cee ("app/procinfo: add collectd format and host id")
Cc: stable@dpdk.org
Signed-off-by: Roman Korynkevych <romanx.korynkevych@intel.com>
---
app/proc_info/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/proc_info/main.c b/app/proc_info/main.c
index 16b27b2..97d0352 100644
--- a/app/proc_info/main.c
+++ b/app/proc_info/main.c
@@ -189,7 +189,7 @@ proc_info_preparse_args(int argc, char **argv)
proc_info_usage(prgname);
return -1;
}
- strncpy(host_id, argv[i+1], sizeof(host_id));
+ strncpy(host_id, argv[i+1], sizeof(host_id)-1);
}
}
--
2.1.0
reply other threads:[~2017-04-21 15:06 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=1492787196-9101-1-git-send-email-romanx.korynkevych@intel.com \
--to=romanx.korynkevych@intel.com \
--cc=dev@dpdk.org \
--cc=harry.van.haaren@intel.com \
--cc=maryam.tahhan@intel.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).