[BOOTLIB]
authorThomas Faber <thomas.faber@reactos.org>
Wed, 17 May 2017 16:06:24 +0000 (16:06 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Wed, 17 May 2017 16:06:24 +0000 (16:06 +0000)
- Avoid uninitialized ComputeHash variable in BlImgLoadImageWithProgress2
CORE-13265 #resolve

svn path=/trunk/; revision=74571

reactos/boot/environ/lib/misc/image.c

index c1c2fea..767fb89 100644 (file)
@@ -507,6 +507,7 @@ BlImgLoadImageWithProgress2 (
 
     /* Check if we should compute hash and/or signatures */
     ComputeSignature = ImageFlags & BL_LOAD_IMG_COMPUTE_SIGNATURE;
+    ComputeHash = FALSE;
     if ((ComputeSignature) || (ImageFlags & BL_LOAD_IMG_COMPUTE_HASH))
     {
         ComputeHash = TRUE;
@@ -561,7 +562,7 @@ BlImgLoadImageWithProgress2 (
     }
 
     /* Is the read fully complete? We need to finalize the hash if requested */
-    if (ComputeHash != RemainingLength)
+    if (ComputeHash)
     {
         // todo: CRYPTO IS HARD
     }