apitrace/apitrace — pull request #298 by chrisforbes (2014-11-21 06:06:10+00:00)
Title: qapitrace: Don't crash when dragging outside image in viewer

When the mouse is down, movement events continue to be delivered
to the PixelWidget even when outside the widget.

In these cases, we reference memory outside the image buffer. This
usually worked out OK, as the nearby addresses were usually mapped.
However, the x value gets converted to unsigned before being added, so
very small negative x values end up offsetting the pixel pointer by many
gigabytes, which is almost certainly not accessible, and explodes.

Instead, if the position is outside the image, safely return a fixed
(out of bounds) message.

Fixes #269.

Signed-off-by: Chris Forbes