]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
lib/file: improved defensive response
authorVMware, Inc <>
Mon, 26 Sep 2011 17:59:06 +0000 (10:59 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Mon, 26 Sep 2011 17:59:06 +0000 (10:59 -0700)
The /proc parser should bail and use its error processing in one
additional case.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/lib/file/fileLockPosix.c

index 6d01e8b58d51ee3c54781e0eefbf4045c5b6267d..d20b6d16831fcbe2fda8c3e8188b8d72800e8383 100644 (file)
@@ -716,7 +716,7 @@ FileLockProcessDescriptor(pid_t pid)  // IN:
 
       q = strrchr(p + 1, ')');
       if (q == NULL) {
-         argc = 0;
+         goto bail;
       }
 
       rest = q + 1;