cfgfile: fix parsing of long fields
authorJoseph Richard <joseph.richard@windriver.com>
Fri, 31 Mar 2017 13:52:02 +0000 (09:52 -0400)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 4 Apr 2017 14:32:06 +0000 (16:32 +0200)
commit3f3d51ebc88bea669fbc3712da80f148cc12f6c5
tree60d05c224ef72570ad497d072d0ff20971aae950
parent8eaff74f22cc762e98a4f4adfcbe75e0f74a80a3
cfgfile: fix parsing of long fields

When parsing a ini file with a "key = value" line that has both "key" and
"value" sized to the maximum allowed length causes a parsing failure.  The
internal "buffer" variable should be sized at least as large as the maximum
for both fields.  This commit updates the local array to be sized to hold
the max name, max value, " = ", and the nul terminator.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
lib/librte_cfgfile/rte_cfgfile.c