Commit 982d1fe6 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Fix null pointer dereference

Detail:
  s/Module - Fix null pointer dereference in drive detection code if an ATAPI device is found which failed to respond to ADFS's identify packet
Admin:
  Untested
  Should fix issue reported on forums:
  https://www.riscosopen.org/forum/forums/5/topics/3929


Version 1.40. Tagged as 'ATAPI-1_40'
parent eeb4bcb0
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.39"
Module_Version SETA 139
Module_MajorVersion SETS "1.40"
Module_Version SETA 140
Module_MinorVersion SETS ""
Module_Date SETS "31 Jan 2016"
Module_ApplicationDate SETS "31-Jan-16"
Module_Date SETS "23 Feb 2016"
Module_ApplicationDate SETS "23-Feb-16"
Module_ComponentName SETS "ATAPI"
Module_ComponentPath SETS "castle/RiscOS/Sources/HWSupport/CD/ATAPI"
Module_FullVersion SETS "1.39"
Module_HelpVersion SETS "1.39 (31 Jan 2016)"
Module_FullVersion SETS "1.40"
Module_HelpVersion SETS "1.40 (23 Feb 2016)"
END
/* (1.39)
/* (1.40)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.39
#define Module_MajorVersion_CMHG 1.40
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 31 Jan 2016
#define Module_Date_CMHG 23 Feb 2016
#define Module_MajorVersion "1.39"
#define Module_Version 139
#define Module_MajorVersion "1.40"
#define Module_Version 140
#define Module_MinorVersion ""
#define Module_Date "31 Jan 2016"
#define Module_Date "23 Feb 2016"
#define Module_ApplicationDate "31-Jan-16"
#define Module_ApplicationDate "23-Feb-16"
#define Module_ComponentName "ATAPI"
#define Module_ComponentPath "castle/RiscOS/Sources/HWSupport/CD/ATAPI"
#define Module_FullVersion "1.39"
#define Module_HelpVersion "1.39 (31 Jan 2016)"
#define Module_LibraryVersionInfo "1:39"
#define Module_FullVersion "1.40"
#define Module_HelpVersion "1.40 (23 Feb 2016)"
#define Module_LibraryVersionInfo "1:40"
......@@ -303,6 +303,12 @@ MIC_IDEDevInfo
STRNEB r8, [r5, r4]
BNE MIC_DoneCheckForATAPI
; Although it's been detected as ATAPI, there'd no guarantee that it will have responded to the identify packet
CMP r3, #0
STREQB r8, [r5, r4]
BEQ MIC_DoneCheckForATAPI
LDRB r9, [r3, #ATAPIID__GENERAL_CONFIGURATION + 1]
LDRB r14,[r3, #ATAPIID__GENERAL_CONFIGURATION]
ORR r9,r14,r9,LSL # 8
......
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