Fix for NULL pointer dereference with Count/Copy/Wipe ops on duff FS
Each of the 3 wildcard accepting OS_FSControl options takes its own copies of the paths in Util_CommonStart then frees the PassedFilename (and co). This is generally OK because the src name is kept in a 'copy block' struct relative to R7 (and, for Copy, the dst in a second struct relative to R8). However, when needing to get info on objects or other low level operations, if the FS is marked in the 'DuffFS' table it would then do a safety check for multiple $'s in the PassedFilename and in doing so dereferences a NULL pointer. Ref https://www.riscosopen.org/forum/forums/4/topics/17259 Since the filenames constructed by resolving wildcards for Count/Copy/Wipe are all sanitised by Process_WildPathname we can skip the safety check; there will only be 1 $ by then. FSUtils3.s: Correct misleading comment LowLevel.s: Avoid NULL pointer dereference, drop noisy debug on every FS lookup Version 2.89. Tagged as 'FileSwitch-2_89'
Showing
Please register or sign in to comment