cmdline: check size of result buffer to avoid overflow
[libcmdline.git] / src / genconf / parse_confnode.h
index e47f679..83a925a 100644 (file)
@@ -44,7 +44,8 @@ typedef struct token_conf_node parse_token_conf_node_t;
 
 extern struct cmdline_token_ops token_conf_node_ops;
 
-int parse_conf_node(cmdline_parse_token_hdr_t *tk, const char *srcbuf, void *res);
+int parse_conf_node(cmdline_parse_token_hdr_t *tk, const char *srcbuf,
+                   void *res, unsigned ressize);
 int complete_get_nb_conf_node(cmdline_parse_token_hdr_t *tk);
 int complete_get_elt_conf_node(cmdline_parse_token_hdr_t *tk, int idx,
                              char *dstbuf, unsigned int size);