On Wed, Aug 3, 2011 at 8:56 AM, Supriya Kannery
<supri...@linux.vnet.ibm.com> wrote:
> For security purpose, convert  'int i' to 'unsigned int i' in
> virtio functions, so that range of index is restricted
> to positive value.
>
> Signed-off-by: Supriya Kannery (supri...@linux.vnet.ibm.com)
>
> ---
>  hw/virtio.c |   27 +++++++++++++++++----------
>  hw/virtio.h |    3 ++-
>  2 files changed, 19 insertions(+), 11 deletions(-)

I think this change is good because the ints are accidents waiting to happen.

The commit message should be descriptive though: "virtio: make indices
unsigned".  There is currently no bug in the code AFAICT.  This is not
a security fix, just a cleanup to make the code safer.

Stefan

Reply via email to