afs: check for non-NULL before memset in afs_LookupName 83/15283/3 master
authorStephan Wiesand <stephan.wiesand@desy.de>
Wed, 18 Jan 2023 13:18:08 +0000 (14:18 +0100)
committerBenjamin Kaduk <kaduk@mit.edu>
Thu, 19 Jan 2023 23:58:34 +0000 (18:58 -0500)
commite2890626bc11964dd96cde0d7d8dd7fdfcf90857
treea573ca174e5c870554bdcc437a6b756584cccbe7
parent68851b782ca2cb5e4ae7457255841f44f3bef15c
afs: check for non-NULL before memset in afs_LookupName

Commit 981bc005f8161ca9ee52ea281c7d73e0e4e2461a refactored PNewStatMount
and PFlushMount by moving their common logic to a new function
afs_LookupName(). In this function, the output parameters are zeroed.
However, this is done before checking that their pointers are valid.
Add additional checks before memset().

Change-Id: I134550d5f9b6d5a9aa5c360e260335d2efce884a
Reviewed-on: https://gerrit.openafs.org/15283
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/afs/afs_pioctl.c