[UDFS]
authorPierre Schweitzer <pierre@reactos.org>
Mon, 5 Jun 2017 13:00:58 +0000 (13:00 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Mon, 5 Jun 2017 13:00:58 +0000 (13:00 +0000)
Misc coverity fixes.
CID 14120111321904132200813221511321905

CORE-4375

svn path=/trunk/; revision=74921

reactos/drivers/filesystems/udfs/fileinfo.cpp
reactos/drivers/filesystems/udfs/namesup.cpp
reactos/drivers/filesystems/udfs/udf_info/dirtree.cpp
reactos/drivers/filesystems/udfs/udf_info/extent.cpp
reactos/drivers/filesystems/udfs/udf_info/mount.cpp

index bb611e5..cb87cf4 100644 (file)
@@ -1242,7 +1242,7 @@ UDFMarkStreamsForDeletion(
                                                         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);
                         }
                     }
index b1a3027..a028f28 100644 (file)
@@ -241,7 +241,7 @@ UDFIsMatchAllMask(
             if((*Buffer) != DOS_QM)
                 return FALSE;
         }
-        if(*DosOpen)
+        if(DosOpen)
             *DosOpen = TRUE;
         return TRUE;
     } else
@@ -253,7 +253,7 @@ UDFIsMatchAllMask(
             return FALSE;
         if(Buffer[2] != DOS_STAR)
             return FALSE;
-        if(*DosOpen)
+        if(DosOpen)
             *DosOpen = TRUE;
         return TRUE;
     } else {
index fdb0e52..0f425c7 100644 (file)
@@ -612,6 +612,7 @@ UDFIndexDirectory(
     if(DirNdx->FileEntryLoc.logicalBlockNum == (ULONG)-1) {
         DirPrint(("  err: FileEntryLoc=-1\n"));
         DbgFreePool(buff);
+        UDFDirIndexFree(hDirNdx);
         return STATUS_FILE_CORRUPT_ERROR;
     }
     DirNdx->FileCharacteristics = (FileInfo->FileIdent) ?
index 4d55137..8c76c2b 100644 (file)
@@ -2640,6 +2640,7 @@ UDFBuildAllocDescs(
     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;
     }
index 28583a4..df10a56 100644 (file)
@@ -391,7 +391,7 @@ UDFUpdateLogicalVolInt(
     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))