[Top][All Lists]

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH for-2.5] bt: avoid unintended sig

From: Markus Armbruster
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH for-2.5] bt: avoid unintended sign extension
Date: Fri, 27 Nov 2015 15:36:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Paolo Bonzini <address@hidden> writes:

> In the case of a 4-byte length, shifting a value by 24 may cause
> an unintended sign extension when converting from int to size_t.
> Use a uint32_t variable instead.
> Signed-off-by: Paolo Bonzini <address@hidden>

For 32 bit ssize_t, lengths > 0x7fffffff go to negative, same as before.

Reviewed-by: Markus Armbruster <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]