qapitrace: Don't crash when dragging outside image in viewer
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 <5dcac483e7a6e31a5cbe89f38cc69dff8ee93dac@ijw.co.nz>

trtt/apitrace,tuanthng/apitrace,trtt/apitrace,surround-io/apitrace,apitrace/apitrace,swq0553/apitrace,apitrace/apitrace,tuanthng/apitrace,trtt/apitrace,apitrace/apitrace,surround-io/apitrace,EoD/apitrace,schulmar/apitrace,joshua5201/apitrace,surround-io/apitrace,schulmar/apitrace,trtt/apitrace,swq0553/apitrace,schulmar/apitrace,tuanthng/apitrace,surround-io/apitrace,surround-io/apitrace,trtt/apitrace,tuanthng/apitrace,EoD/apitrace,tuanthng/apitrace,swq0553/apitrace,EoD/apitrace,schulmar/apitrace,joshua5201/apitrace,joshua5201/apitrace,swq0553/apitrace,schulmar/apitrace,joshua5201/apitrace,joshua5201/apitrace,swq0553/apitrace,EoD/apitrace,apitrace/apitrace,EoD/apitrace