libcacard: fix soft=... parsing in vcard_emul_options
The previous parser had copy and paste errors when computing vname_length and type_params_length, "name" was used instead of respectively vname and type_params. This led to length that could be bigger than the input string, and to access out of the array bounds when trying to copy these strings. valgrind rightfully complained about this. It also didn't handle empty fields correctly, Signed-off-by: NChristophe Fergeau <cfergeau@redhat.com> Reviewed-by: NAlon Levy <alevy@redhat.com>
Showing
想要评论请 注册 或 登录