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

Re: [PATCH] hw/display/xenfb: Replace unreachable code by abort()



On 13/10/25 13:10, Markus Armbruster wrote:
Ping?

Markus Armbruster <armbru@xxxxxxxxxx> writes:

xenfb_mouse_event() has a switch statement whose controlling
expression move->axis is an enum InputAxis.  The enum values are
INPUT_AXIS_X and INPUT_AXIS_Y, encoded as 0 and 1.  The switch has a
case for both axes.  In addition, it has an unreachable default label.
This convinces Coverity that move->axis can be greater than 1.  It
duly reports a buffer overrun when it is used to subscript an array
with two elements.

Replace the unreachable code by abort().

Resolves: Coverity CID 1613906
Signed-off-by: Markus Armbruster <armbru@xxxxxxxxxx>
---
  hw/display/xenfb.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>

and queued with g_assert_not_reached(), thanks!



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.