Re: [Libvir] PATCH: Fix crash parsing input devices for QEMU

2007-09-28 Thread Richard W.M. Jones

Daniel P. Berrange wrote:

There is an edge case in parsing of input devices where if you have a PS2
mouse defined, before a USB tablet, it could generate a null pointer
deference  thus crash. Normally you'd only have one pointer defined, but
one might add a USB tablet for getting a improved mouse experience.


ACK.

Rich.

--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903


smime.p7s
Description: S/MIME Cryptographic Signature
--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[Libvir] PATCH: Fix crash parsing input devices for QEMU

2007-09-27 Thread Daniel P. Berrange
There is an edge case in parsing of input devices where if you have a PS2
mouse defined, before a USB tablet, it could generate a null pointer
deference  thus crash. Normally you'd only have one pointer defined, but
one might add a USB tablet for getting a improved mouse experience.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-   Perl modules: http://search.cpan.org/~danberr/  -=|
|=-   Projects: http://freshmeat.net/~danielpb/   -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 
Index: src/qemu_conf.c
===
RCS file: /data/cvs/libvirt/src/qemu_conf.c,v
retrieving revision 1.14
diff -u -p -r1.14 qemu_conf.c
--- src/qemu_conf.c 21 Sep 2007 21:20:32 -  1.14
+++ src/qemu_conf.c 26 Sep 2007 00:42:05 -
@@ -1312,7 +1312,7 @@ static struct qemud_vm_def *qemudParseXM
 }
 def-ninputs++;
 input-next = NULL;
-if (i == 0) {
+if (def-inputs == NULL) {
 def-inputs = input;
 } else {
 prev-next = input;
--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list