Re: [PATCH] Enhanced stats for fullvirt domains

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

 



"Richard W.M. Jones" <rjones@xxxxxxxxxx> wrote:
...
>> That function should also check LEN (i.e., what if it's 0 or 1?).
>> Otherwise, STREQ might read uninitialized memory.
>
> I've addressed that by doing something, hopefully the right thing, if
> len == 0.  (We would expect len == 1).

Yeah, you're right.  len==0 was the only missed case.
I didn't realize at the time that "len" doesn't include
the trailing NUL byte.

>> The "unsigned len = 0;" initialization looks unnecessary.
>
> I left that because I can't see it doing any harm in this case.

It's not a big deal.
True, it causes no run-time harm, but anything unnecessary
can make the reviewer/maintainer wonder "why?".
...
> It would have to be really really large (these are 64 bit numbers),
> but yes I have fixed this too.
>
> Updated patch is attached.

Looks fine, now.

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