]> git.ipfire.org Git - thirdparty/libvirt.git/commit
libxl: Resolve possible resource leak in dom0 maximum memory setting
authorJohn Ferlan <jferlan@redhat.com>
Fri, 10 Feb 2017 11:54:56 +0000 (06:54 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 10 Feb 2017 19:11:04 +0000 (14:11 -0500)
commit4ab0c959e936de7fa2752160ff532913740d4da9
tree78ee76c3e1660a2aca4ca2a9ea0591869fc3a890
parentb2774db9c2bf7e53a841726fd209f6717b4ad48f
libxl: Resolve possible resource leak in dom0 maximum memory setting

If either the "if (STRPREFIX(mem_tokens[j], "max:"))" is never entered
or the "if (virStrToLong_ull(mem_tokens[j] + 4, &p, 10, maxmem) < 0)" break
is hit, control goes back to the outer loop processing 'cmd_tokens' and
it's possible that the 'mem_tokens' would be overwritten.

Found by Coverity
src/libxl/libxl_conf.c