Author: pschweitzer
Date: Mon Jun 5 13:00:58 2017
New Revision: 74921
URL:
http://svn.reactos.org/svn/reactos?rev=74921&view=rev
Log:
[UDFS]
Misc coverity fixes.
CID 1412011, 1321904, 1322008, 1322151, 1321905
CORE-4375
Modified:
trunk/reactos/drivers/filesystems/udfs/fileinfo.cpp
trunk/reactos/drivers/filesystems/udfs/namesup.cpp
trunk/reactos/drivers/filesystems/udfs/udf_info/dirtree.cpp
trunk/reactos/drivers/filesystems/udfs/udf_info/extent.cpp
trunk/reactos/drivers/filesystems/udfs/udf_info/mount.cpp
Modified: trunk/reactos/drivers/filesystems/udfs/fileinfo.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/udfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/udfs/fileinfo.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/udfs/fileinfo.cpp [iso-8859-1] Mon Jun 5 13:00:58
2017
@@ -1242,7 +1242,7 @@
UDF_FCB_DELETE_PARENT);
} else {
AdPrint((" CLEAR stream DeleteOnClose\n"));
- FileInfo->Fcb->FCBFlags &=
!(UDF_FCB_DELETE_ON_CLOSE |
+ FileInfo->Fcb->FCBFlags &=
~(UDF_FCB_DELETE_ON_CLOSE |
UDF_FCB_DELETE_PARENT);
}
}
Modified: trunk/reactos/drivers/filesystems/udfs/namesup.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/udfs/n…
==============================================================================
--- trunk/reactos/drivers/filesystems/udfs/namesup.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/udfs/namesup.cpp [iso-8859-1] Mon Jun 5 13:00:58
2017
@@ -241,7 +241,7 @@
if((*Buffer) != DOS_QM)
return FALSE;
}
- if(*DosOpen)
+ if(DosOpen)
*DosOpen = TRUE;
return TRUE;
} else
@@ -253,7 +253,7 @@
return FALSE;
if(Buffer[2] != DOS_STAR)
return FALSE;
- if(*DosOpen)
+ if(DosOpen)
*DosOpen = TRUE;
return TRUE;
} else {
Modified: trunk/reactos/drivers/filesystems/udfs/udf_info/dirtree.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/udfs/u…
==============================================================================
--- trunk/reactos/drivers/filesystems/udfs/udf_info/dirtree.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/udfs/udf_info/dirtree.cpp [iso-8859-1] Mon Jun 5
13:00:58 2017
@@ -612,6 +612,7 @@
if(DirNdx->FileEntryLoc.logicalBlockNum == (ULONG)-1) {
DirPrint((" err: FileEntryLoc=-1\n"));
DbgFreePool(buff);
+ UDFDirIndexFree(hDirNdx);
return STATUS_FILE_CORRUPT_ERROR;
}
DirNdx->FileCharacteristics = (FileInfo->FileIdent) ?
Modified: trunk/reactos/drivers/filesystems/udfs/udf_info/extent.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/udfs/u…
==============================================================================
--- trunk/reactos/drivers/filesystems/udfs/udf_info/extent.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/udfs/udf_info/extent.cpp [iso-8859-1] Mon Jun 5
13:00:58 2017
@@ -2640,6 +2640,7 @@
InitSz = Vcb->LBlockSize - FileInfo->Dloc->FileEntryLen;
Allocs = (int8*)MyAllocatePool__(NonPagedPool, InitSz);
if(!Allocs) {
+ *AllocData = NULL;
AdPrint(("BuildAllocDesc: cant alloc %x bytes for Allocs\n", InitSz));
return STATUS_INSUFFICIENT_RESOURCES;
}
Modified: trunk/reactos/drivers/filesystems/udfs/udf_info/mount.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/udfs/u…
==============================================================================
--- trunk/reactos/drivers/filesystems/udfs/udf_info/mount.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/udfs/udf_info/mount.cpp [iso-8859-1] Mon Jun 5
13:00:58 2017
@@ -391,7 +391,7 @@
LVID_iUse = UDFGetLVIDiUse(Vcb);
if((LVID_iUse->minUDFReadRev == Vcb->minUDFReadRev) &&
- (LVID_iUse->minUDFReadRev == Vcb->minUDFReadRev) &&
+ (LVID_iUse->minUDFWriteRev == Vcb->minUDFWriteRev) &&
(LVID_iUse->maxUDFWriteRev == Vcb->maxUDFWriteRev) &&
(LVID_iUse->numFiles == Vcb->numFiles) &&
(LVID_iUse->numDirs == Vcb->numDirs))