]> xenbits.xensource.com Git - libvirt.git/commit
tests: utils: Fix out-of-bounds access to memory in virTestCompareToFile
authorPeter Krempa <pkrempa@redhat.com>
Tue, 3 Apr 2018 14:16:52 +0000 (16:16 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 4 Apr 2018 10:04:21 +0000 (12:04 +0200)
commit9c75425aa263abe248ab6c4895b57b9dae2a53ae
treee1bf4bbcfd2ea4f606fa0d4f90bdd69edc12c285
parentc018533156edbcb3c47d8056510a314471c5b2aa
tests: utils: Fix out-of-bounds access to memory in virTestCompareToFile

Similarly to 3506f1ecfde, the contents of 'cmpcontent' may be an empty
string so the following code would access memory out of the array.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
tests/testutils.c