]> git.ipfire.org Git - thirdparty/libvirt.git/commit
logging: fix off-by-one bug
authorEric Blake <eblake@redhat.com>
Sat, 19 Mar 2011 02:19:31 +0000 (20:19 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 21 Mar 2011 15:35:01 +0000 (09:35 -0600)
commitdd5564f218f54bbca6aa57394b755f61ca224501
tree2335c1363bcf67a42fb80b5f0a167bdfc4530c8f
parent3c2b210a3c7d21474e4e9a2833fab2096ef0d98d
logging: fix off-by-one bug

Valgrind caught that our log wrap-around was going 1 past the end.
Regression introduced in commit b16f47a; previously the
buffer was static and size+1 bytes, but now it is dynamic and
exactly size bytes.

* src/util/logging.c (virLogStr): Don't write past end of log.
src/util/logging.c