mirror of
https://github.com/reactos/reactos.git
synced 2025-05-19 17:14:32 +00:00
[UDFS] Zero-initialize IO_STATUS_BLOCK data in UDFCommonCreate
Some places have been changed to return FILE_DOES_NOT_EXIST, everything else just returns 0. FastFAT driver from MS does the same (tm), so I'm not going to have a big research here. CORE-16623 Co-authored-by: Suraj K Suresh <kssuraj15@gmail.com>
This commit is contained in:
parent
622f187c04
commit
c40b0866b1
1 changed files with 7 additions and 1 deletions
|
@ -231,7 +231,7 @@ UDFCommonCreate(
|
||||||
PtrUDFFCB PtrRelatedFCB = NULL, PtrNewFcb = NULL;
|
PtrUDFFCB PtrRelatedFCB = NULL, PtrNewFcb = NULL;
|
||||||
PtrUDFNTRequiredFCB NtReqFcb;
|
PtrUDFNTRequiredFCB NtReqFcb;
|
||||||
|
|
||||||
ULONG ReturnedInformation;
|
ULONG ReturnedInformation = 0;
|
||||||
|
|
||||||
UNICODE_STRING TargetObjectName;
|
UNICODE_STRING TargetObjectName;
|
||||||
UNICODE_STRING RelatedObjectName;
|
UNICODE_STRING RelatedObjectName;
|
||||||
|
@ -487,6 +487,7 @@ UDFCommonCreate(
|
||||||
|
|
||||||
if (Vcb->SoftEjectReq) {
|
if (Vcb->SoftEjectReq) {
|
||||||
AdPrint((" Eject requested\n"));
|
AdPrint((" Eject requested\n"));
|
||||||
|
ReturnedInformation = FILE_DOES_NOT_EXIST;
|
||||||
try_return(RC = STATUS_FILE_INVALID);
|
try_return(RC = STATUS_FILE_INVALID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -580,6 +581,7 @@ UDFCommonCreate(
|
||||||
|
|
||||||
if ((RequestedDisposition != FILE_OPEN) && (RequestedDisposition != FILE_OPEN_IF)) {
|
if ((RequestedDisposition != FILE_OPEN) && (RequestedDisposition != FILE_OPEN_IF)) {
|
||||||
// cannot create a new volume, I'm afraid ...
|
// cannot create a new volume, I'm afraid ...
|
||||||
|
ReturnedInformation = FILE_DOES_NOT_EXIST;
|
||||||
try_return(RC = STATUS_ACCESS_DENIED);
|
try_return(RC = STATUS_ACCESS_DENIED);
|
||||||
}
|
}
|
||||||
#endif //UDF_READ_ONLY_BUILD
|
#endif //UDF_READ_ONLY_BUILD
|
||||||
|
@ -1026,6 +1028,7 @@ op_vol_accs_dnd:
|
||||||
if(Vcb->VCBFlags & UDF_VCB_FLAGS_RAW_DISK) {
|
if(Vcb->VCBFlags & UDF_VCB_FLAGS_RAW_DISK) {
|
||||||
ReturnedInformation = 0;
|
ReturnedInformation = 0;
|
||||||
AdPrint((" Can't open File on blank volume ;)\n"));
|
AdPrint((" Can't open File on blank volume ;)\n"));
|
||||||
|
ReturnedInformation = FILE_DOES_NOT_EXIST;
|
||||||
try_return(RC = STATUS_OBJECT_NAME_NOT_FOUND);
|
try_return(RC = STATUS_OBJECT_NAME_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1042,6 +1045,7 @@ op_vol_accs_dnd:
|
||||||
try_return(RC = STATUS_OBJECT_NAME_INVALID);
|
try_return(RC = STATUS_OBJECT_NAME_INVALID);
|
||||||
}
|
}
|
||||||
if(StreamOpen && !UDFStreamsSupported(Vcb)) {
|
if(StreamOpen && !UDFStreamsSupported(Vcb)) {
|
||||||
|
ReturnedInformation = FILE_DOES_NOT_EXIST;
|
||||||
try_return(RC = STATUS_OBJECT_NAME_INVALID);
|
try_return(RC = STATUS_OBJECT_NAME_INVALID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1450,6 +1454,7 @@ Skip_open_attempt:
|
||||||
} else {
|
} else {
|
||||||
AdPrint((" Open Target: unexpected error\n"));
|
AdPrint((" Open Target: unexpected error\n"));
|
||||||
NewFileInfo = NULL;
|
NewFileInfo = NULL;
|
||||||
|
ReturnedInformation = FILE_DOES_NOT_EXIST;
|
||||||
try_return(RC = STATUS_OBJECT_NAME_INVALID);
|
try_return(RC = STATUS_OBJECT_NAME_INVALID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1500,6 +1505,7 @@ Skip_open_attempt:
|
||||||
if ((RequestedDisposition != FILE_CREATE) && (RequestedDisposition != FILE_OPEN_IF) &&
|
if ((RequestedDisposition != FILE_CREATE) && (RequestedDisposition != FILE_OPEN_IF) &&
|
||||||
(RequestedDisposition != FILE_OVERWRITE_IF) && (RequestedDisposition != FILE_SUPERSEDE)) {
|
(RequestedDisposition != FILE_OVERWRITE_IF) && (RequestedDisposition != FILE_SUPERSEDE)) {
|
||||||
AdPrint((" File doesn't exist (2)\n"));
|
AdPrint((" File doesn't exist (2)\n"));
|
||||||
|
ReturnedInformation = FILE_DOES_NOT_EXIST;
|
||||||
try_return(RC);
|
try_return(RC);
|
||||||
}
|
}
|
||||||
// Check Volume ReadOnly attr
|
// Check Volume ReadOnly attr
|
||||||
|
|
Loading…
Reference in a new issue