Commit 384a1ec5 authored by Andy Vawer's avatar Andy Vawer Committed by ROOL
Browse files

Fix zero page access looking for ptr_ sprite validation

On mouse click, check for icon type was incorrect, so trying to apply tests for 'P' validation string/ptr_write on inappropriate icons (eg. sprites), leading to invalid validation string accesses. Correct the test performed.
Also add 3 further AcceptLoosePointer checks to validation string pointers.

Version 5.69. Tagged as 'Wimp-5_69'
parent 28d1efb9
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
GBLS Module_ApplicationDate GBLS Module_ApplicationDate
GBLS Module_HelpVersion GBLS Module_HelpVersion
GBLS Module_ComponentName GBLS Module_ComponentName
Module_MajorVersion SETS "5.68" Module_MajorVersion SETS "5.69"
Module_Version SETA 568 Module_Version SETA 569
Module_MinorVersion SETS "" Module_MinorVersion SETS ""
Module_Date SETS "04 Jan 2020" Module_Date SETS "18 Jan 2020"
Module_ApplicationDate SETS "04-Jan-20" Module_ApplicationDate SETS "18-Jan-20"
Module_ComponentName SETS "Wimp" Module_ComponentName SETS "Wimp"
Module_FullVersion SETS "5.68" Module_FullVersion SETS "5.69"
Module_HelpVersion SETS "5.68 (04 Jan 2020)" Module_HelpVersion SETS "5.69 (18 Jan 2020)"
END END
/* (5.68) /* (5.69)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* *
*/ */
#define Module_MajorVersion_CMHG 5.68 #define Module_MajorVersion_CMHG 5.69
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 04 Jan 2020 #define Module_Date_CMHG 18 Jan 2020
#define Module_MajorVersion "5.68" #define Module_MajorVersion "5.69"
#define Module_Version 568 #define Module_Version 569
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "04 Jan 2020" #define Module_Date "18 Jan 2020"
#define Module_ApplicationDate "04-Jan-20" #define Module_ApplicationDate "18-Jan-20"
#define Module_ComponentName "Wimp" #define Module_ComponentName "Wimp"
#define Module_FullVersion "5.68" #define Module_FullVersion "5.69"
#define Module_HelpVersion "5.68 (04 Jan 2020)" #define Module_HelpVersion "5.69 (18 Jan 2020)"
#define Module_LibraryVersionInfo "5:68" #define Module_LibraryVersionInfo "5:69"
...@@ -6161,8 +6161,9 @@ doublewritable_on ...@@ -6161,8 +6161,9 @@ doublewritable_on
LDR R0,[handle,#w_icons] LDR R0,[handle,#w_icons]
ADD R0,R0,R4,LSL #i_shift ADD R0,R0,R4,LSL #i_shift
LDR R3,[R0,#i_data+4] LDR R3,[R0,#i_data+4]
CMP R3,#0 AcceptLoosePointer_NegOrZero r3,-1
BLE %FT99 ; no CMP R3,R3,ASR #31
BEQ %FT99 ; no
; page in the task holding the icon ; page in the task holding the icon
LDR R14,taskhandle LDR R14,taskhandle
......
...@@ -2133,9 +2133,9 @@ testbutton ...@@ -2133,9 +2133,9 @@ testbutton
MOV R14,#1 MOV R14,#1
STRB R14,cnp_clickcounter STRB R14,cnp_clickcounter
BEQ %FT00 BEQ %FT00
TST R6,#ibb_writeable TST R6,#ibb_cnpwriteable
BLNE doubleptr_on BLNE doublewritable_on
BLEQ doublewritable_on BLEQ doubleptr_on
00 00
| |
BLNE doubleptr_on ; if current shape = 1, set double ptr BLNE doubleptr_on ; if current shape = 1, set double ptr
...@@ -2206,7 +2206,8 @@ wait2clicks ...@@ -2206,7 +2206,8 @@ wait2clicks
TST R6,#ibb_cnpwriteable TST R6,#ibb_cnpwriteable
STREQ R7,mouseflags STREQ R7,mouseflags
BLEQ doublewritable_off BLNE doublewritable_off
BLEQ doubleptr_off
BEQ justtellhim ; normal action if CC and not a writeable BEQ justtellhim ; normal action if CC and not a writeable
; we are a cnp writeable at this point ; we are a cnp writeable at this point
......
...@@ -3239,8 +3239,9 @@ clipboard_abort_drag ...@@ -3239,8 +3239,9 @@ clipboard_abort_drag
clipboard_check_disabled clipboard_check_disabled
; returns Z set if clipboard key handling is disabled; clear otherwise ; returns Z set if clipboard key handling is disabled; clear otherwise
CMP R3,#0 AcceptLoosePointer_NegOrZero R3,-1
BGT %FT00 CMP R3,R3,ASR #31
BNE %FT00
TST R14,R14 ; unset Z TST R14,R14 ; unset Z
MOV PC,R14 MOV PC,R14
00 00
...@@ -3538,9 +3539,10 @@ clipboard_wpaste ...@@ -3538,9 +3539,10 @@ clipboard_wpaste
[ UTF8 [ UTF8
; get max UTF8 length if applicable ; get max UTF8 length if applicable
Push "R8" Push "R8"
CMP R3,#0 AcceptLoosePointer_NegOrZero R3,-1
MOVLE R8,#bignum CMP R3,R3,ASR #31
BLE %FT21 ; no validation string present MOVEQ R8,#bignum
BEQ %FT21 ; no validation string present
Push "R0-R3" Push "R0-R3"
MOV R2, #WimpValidation_CharLimit ; find "U" command, if any MOV R2, #WimpValidation_CharLimit ; find "U" command, if any
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment