Browse Source

HPCC-24688 Fix memcmp length 0 of null caught by sanitize checking

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 4 years ago
parent
commit
67c96f3190
1 changed files with 2 additions and 0 deletions
  1. 2 0
      plugins/cryptolib/cryptolib.cpp

+ 2 - 0
plugins/cryptolib/cryptolib.cpp

@@ -779,6 +779,8 @@ private:
     {
         if (lenLeft != lenRight)
             return false;
+        if (lenLeft == 0)
+            return true;
         return memcmp(left, right, lenLeft) == 0;
     }