]> git.michaelhowe.org Git - packages/o/openafs.git/commit
tests: fix out of bounds access in the rx-event test
authorMichael Meffie <mmeffie@sinenomine.net>
Mon, 6 Nov 2017 22:37:46 +0000 (17:37 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Tue, 28 Nov 2017 04:49:46 +0000 (23:49 -0500)
commit42993b3a33d53a6e16337d2ebe15539d0febdef1
tree7d0a6e68e511c503d21326d3eac911bfb5924e91
parent6c635a66b54bcfa2920ac532905758346c89c772
tests: fix out of bounds access in the rx-event test

Use the NUMEVENTS symbol which defines the array size instead of an
incorrect hard coded number when checking if a second event can be added
to be fired at the same time.  This fixes a potential out of bounds
access of the event test array.

Also update the comment which incorrectly mentions the incorrect number
of events in the test.

Reviewed-on: https://gerrit.openafs.org/12762
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 50a3eb7b7ee94bffaadc98429bd404164e89ec7f)

Change-Id: I7a975e7498c1c7416a800c9294c97ee4de4fd57a
Reviewed-on: https://gerrit.openafs.org/12779
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
tests/rx/event-t.c