[Libvir] [PATCH] Don't access line[-1] for a zero-length "line" from fgets.
Richard W.M. Jones
rjones at redhat.com
Mon Jan 21 13:09:50 UTC 2008
Jim Meyering wrote:
> In reviewing the StorageAPI patches, I saw that some bogus input could
> cause a segfault. There's similar code in libvirt.c, so this fixes both.
> Note that virsh.c does this, too, but it already has the required guard.
>
> The src/libvirt.c patch applies to the trunk, but isn't a big
> deal, since it's in the sample AuthCallback function.
>
> The storage_backend.c part applies to the work-in-progress
> mercurial queue, but does matter, because we have no guarantee
> what the exec'd command will output.
+1.
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080121/33a04272/attachment-0001.bin>
More information about the libvir-list
mailing list