]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix pointer inequality comparison against NULL.
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:04 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:04 +0000 (11:23 -0700)
A pointer is being tested for whether it's less than 0.  Check
for equality with NULL instead.

open-vm-tools/lib/dataMap/dataMap.c

index 6dbc6ac804ef0441d0d3b2ab3840ef4d60ace6da..1582f4f6c72a3000c6369f6d8beac56fe63d22d9 100644 (file)
@@ -2188,7 +2188,7 @@ DataMap_SetStringList(DataMap *that,          // IN/OUT
 {
    DataMapEntry *entry;
 
-   if (that == NULL || strList == NULL || strLens < 0) {
+   if (that == NULL || strList == NULL || strLens == NULL) {
       return DMERR_INVALID_ARGS;
    }