X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=VNFs%2FDPPD-PROX%2Fcmd_parser.c;h=dea955f4db3c78a62ed1c4cdf6879257cffc41f7;hb=da4e41a67cca12cc4160a66ca46a37889137fa1e;hp=d4bfed013da014f161ef886559b938bfcb9d808c;hpb=48f8c3d212644a33dd0abaaa1a0c71d4decaafdf;p=samplevnf.git diff --git a/VNFs/DPPD-PROX/cmd_parser.c b/VNFs/DPPD-PROX/cmd_parser.c index d4bfed01..dea955f4 100644 --- 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++;