cmdline: revert fix overflow on bsd
authorThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 4 Dec 2014 15:13:45 +0000 (16:13 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 4 Dec 2014 15:15:44 +0000 (16:15 +0100)
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>
lib/librte_cmdline/cmdline_parse.c
lib/librte_cmdline/cmdline_parse.h

index 29f1afdbe1f065b4dec0d40528d31540eccae2b5..940480dec6d395c9f038977a69a1d92245467874 100644 (file)
@@ -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;
index dae53ba79066c7a4e1eb64e0af8fd86a36ebdd37..f18836dfb258499a88a9c97b1551c8fcceb8f803 100644 (file)
@@ -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.