From: Oliver Kurth Date: Mon, 28 Oct 2019 23:12:39 +0000 (-0700) Subject: Assertion after use fix - lib/file/standalone.c X-Git-Tag: stable-11.1.0~204 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cd3c86ef2eedf3151e99323e966d35667e32c66;p=thirdparty%2Fopen-vm-tools.git Assertion after use fix - lib/file/standalone.c One of the code scanners caught this one. --- diff --git a/open-vm-tools/lib/file/fileStandAlone.c b/open-vm-tools/lib/file/fileStandAlone.c index b7ce55e90..df2641246 100644 --- a/open-vm-tools/lib/file/fileStandAlone.c +++ b/open-vm-tools/lib/file/fileStandAlone.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2018 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2019 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -202,13 +202,15 @@ File_SplitName(const char *pathName, // IN: char *vol; char *dir; char *bas; + size_t len; char *baseBegin; char *volEnd; int volLen, dirLen; - int len = strlen(pathName); ASSERT(pathName != NULL); + len = strlen(pathName); + /* * Get volume. */