[libvirt] [PATCH] uml: sanity check external data before using it

Eric Blake eblake at redhat.com
Wed Mar 3 16:51:28 UTC 2010


According to Jim Meyering on 3/3/2010 9:41 AM:
> Eric Blake wrote:
>>          if (nbytes < sizeof res) {
>> -            virReportSystemError(errno,
>> +            virReportSystemError(0,
>>                                   _("incomplete reply %s"),
>>                                   cmd);
>>              goto error;
>>          }
>> +        if (sizeof res < res.length) {
>> +            virReportSystemError(0,
>> +                                 _("invalid length in reply %s"),
> 
> Hmm... while you're there, you might want to save 4 lines by joining
> those unnecessarily-continued ones:
> 
>            virReportSystemError(0, _("invalid length in reply %s"), cmd);

Sure.  Respin coming up (this time, in a new thread, to make it easier to
spot).

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 320 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100303/163bc172/attachment-0001.sig>


More information about the libvir-list mailing list