mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 13:38:01 +00:00
bozo: Check for negative simple bnode parameter index
The simple (ez) bnodes have only one parameter, which is accessed as index 0. A check is made for values greater than 0, however the index argument is a signed type, and a check for negative indices is missing. Explicitly check for non-zero index values when retrieving simple bnode parameters, and if not zero return BZDOM. The other bnode types already check for specific (positive) index values, so only the simple bnode type needs to be updated. Change-Id: I8764af6c975431caf26c25a371cf6db10e6e7fec Reviewed-on: https://gerrit.openafs.org/15043 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Mark Vitale <mvitale@sinenomine.net> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
parent
1162fcdba6
commit
3e098400a7
@ -243,8 +243,10 @@ ez_getparm(struct bnode *bn, afs_int32 aindex, char *abuffer,
|
||||
afs_int32 alen)
|
||||
{
|
||||
struct ezbnode *abnode = (struct ezbnode *) bn;
|
||||
if (aindex > 0)
|
||||
|
||||
if (aindex != 0)
|
||||
return BZDOM;
|
||||
|
||||
strcpy(abuffer, abnode->command);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user