summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Monjalon <thomas.monjalon@6wind.com>2014-12-04 16:13:45 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-12-04 16:15:44 +0100
commit29d03f7aa33edc3292bf75730ec684dd4cbe5054 (patch)
treecc4cf3a1288a00be2f6333aadc5bfa6d8fbf9f56
parentb70ae1899fea35be465dca889cbc1bac981dc8ac (diff)
downloaddpdk-29d03f7aa33edc3292bf75730ec684dd4cbe5054.zip
dpdk-29d03f7aa33edc3292bf75730ec684dd4cbe5054.tar.gz
dpdk-29d03f7aa33edc3292bf75730ec684dd4cbe5054.tar.xz
cmdline: revert fix overflow on bsd
Revert commit a0547e0a751100 because it is an old version of the patch and was applied by error. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
-rw-r--r--lib/librte_cmdline/cmdline_parse.c2
-rw-r--r--lib/librte_cmdline/cmdline_parse.h3
2 files changed, 1 insertions, 4 deletions
diff --git a/lib/librte_cmdline/cmdline_parse.c b/lib/librte_cmdline/cmdline_parse.c
index 29f1afd..940480d 100644
--- a/lib/librte_cmdline/cmdline_parse.c
+++ b/lib/librte_cmdline/cmdline_parse.c
@@ -219,7 +219,7 @@ cmdline_parse(struct cmdline *cl, const char * buf)
unsigned int inst_num=0;
cmdline_parse_inst_t *inst;
const char *curbuf;
- char result_buf[CMDLINE_PARSE_RESULT_BUFSIZE];
+ char result_buf[BUFSIZ];
void (*f)(void *, struct cmdline *, void *) = NULL;
void *data = NULL;
int comment = 0;
diff --git a/lib/librte_cmdline/cmdline_parse.h b/lib/librte_cmdline/cmdline_parse.h
index dae53ba..f18836d 100644
--- a/lib/librte_cmdline/cmdline_parse.h
+++ b/lib/librte_cmdline/cmdline_parse.h
@@ -80,9 +80,6 @@ extern "C" {
#define CMDLINE_PARSE_COMPLETE_AGAIN 1
#define CMDLINE_PARSE_COMPLETED_BUFFER 2
-/* maximum buffer size for parsed result */
-#define CMDLINE_PARSE_RESULT_BUFSIZE 8192
-
/**
* Stores a pointer to the ops struct, and the offset: the place to
* write the parsed result in the destination structure.