Re: [PATCH 3/3] tests: Resolve possible overrun

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 20, 2018 at 05:34:38PM -0400, John Ferlan wrote:
> Coverity noted that each of the fmemopen called used the strlen value
> in order to allocate space, but that neglected space for terminating
> null string. So just add 1 to the strlen.
>
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx>

Although, I'm wondering whether it's worth having an internal wrapper like the
STREQ stuff we have to mitigate the off-by-1 errors in cases like these, but I
guess there would be cases, where that might be undesirable.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux