]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libmp: Fix trivial buffer overrun
authorcem <cem@FreeBSD.org>
Thu, 12 May 2016 03:53:20 +0000 (03:53 +0000)
committercem <cem@FreeBSD.org>
Thu, 12 May 2016 03:53:20 +0000 (03:53 +0000)
commit3f6e1e85c8d62e3585cc065f9be1869c45115aae
tree6df2c763616ba28a4378aa60244715c8ec262955
parent97f5dee5405af286addae99e24aa1701e8502db7
libmp: Fix trivial buffer overrun

fgetln yields a non-NUL-terminated buffer and its length.  This routine
attempted to NUL-terminate it, but did not allocate space for the NUL.  So,
allocate space for the NUL.

Reported by: Coverity
CID: 1017457
Sponsored by: EMC / Isilon Storage Division
lib/libmp/mpasbn.c