Re: [PATCH] Fix crash parsing RNG device specification

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

 



On 03/07/2013 04:58 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> Code that validates the whitelist for the RNG device filename
> didn't account for fact that filename may be NULL. This led
> to a NULL reference crash. This wasn't caught since the test
> suite was not covering this XML syntax
> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  src/conf/domain_conf.c                             |  3 ++-
>  .../qemuxml2argv-virtio-rng-default.args           |  6 ++++++
>  .../qemuxml2argv-virtio-rng-default.xml            | 23 ++++++++++++++++++++++
>  tests/qemuxml2argvtest.c                           |  2 ++
>  4 files changed, 33 insertions(+), 1 deletion(-)
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-default.args
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-default.xml

This in turn triggers a test failure - we have to change the schema to
allow for a default value.  I'm pushing this:

diff --git i/docs/schemas/domaincommon.rng w/docs/schemas/domaincommon.rng
index 4b60885..372aab7 100644
--- i/docs/schemas/domaincommon.rng
+++ w/docs/schemas/domaincommon.rng
@@ -3514,6 +3514,7 @@
           <choice>
             <value>/dev/random</value>
             <value>/dev/hwrng</value>
+            <empty/>
           </choice>
         </group>
         <group>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]