Skip to content

Cursor: ignore big cursors

Return early if the cursor received from X is too big.

This fixes a covscan error: "sign_extension: Suspicious implicit sign extension": "cursor->width" with type "unsigned short" (16 bits, unsigned) is promoted in "cursor->width * cursor->height" to type "int" (32 bits, signed), then sign-extended to type "unsigned long" (64 bits, unsigned). If "cursor->width * cursor->height" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.

Signed-off-by: Uri Lublin uril@redhat.com

Merge request reports