Code Review
/
samplevnf.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(from parent 1:
48f8c3d
)
Fix strncpy issue introduced by fb0c44a8
10/68610/1
author
Xavier Simonart
<xavier.simonart@intel.com>
Wed, 9 Oct 2019 17:03:29 +0000
(19:03 +0200)
committer
Xavier Simonart
<xavier.simonart@intel.com>
Wed, 9 Oct 2019 17:45:25 +0000
(19:45 +0200)
Change-Id: I833d753bd5c426d50c0c9fdee5668f3b9fff13b9
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
VNFs/DPPD-PROX/cmd_parser.c
patch
|
blob
|
history
diff --git
a/VNFs/DPPD-PROX/cmd_parser.c
b/VNFs/DPPD-PROX/cmd_parser.c
index
d4bfed0
..
dea955f
100644
(file)
--- a/
VNFs/DPPD-PROX/cmd_parser.c
+++ b/
VNFs/DPPD-PROX/cmd_parser.c
@@
-2272,7
+2272,10
@@
static int parse_cmd_help(const char *str, struct input *input)
len3 = max_len;
}
- prox_strncpy(tmp, h, len3);
+ // Use strncpy here and not prox_strncpy. The dest (tmp) has been initialized with 0.
+ // The fact that we are copying 80 characters potentially not null terminated is hence not an issue.
+ // Using prox_strncpy here might cause a PROX_PANIC
+ strncpy(tmp, h, len3);
h += len3;
while (h[0] == ' ' && strlen(h))
h++;