parse_call_math: NULL terminate buf size recipes
commitf938c088e8bf072366a37b38c0a6eb48612afa24
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 13 Oct 2014 14:23:51 +0000 (13 17:23 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 13 Oct 2014 14:23:51 +0000 (13 17:23 +0300)
tree3539930db504bf9bc9801c180870fb7fab6f8371
parent340241e26db1587e70d80169958e860f0536dcb1
parse_call_math: NULL terminate buf size recipes

Originally the 'buf' array was static so the bug was a bit harder to spot,
but this function was returning the string with garbage tacked on to the
end because it wasn't NULL terminated.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_parse_call_math.c