]> git.michaelhowe.org Git - packages/o/openafs.git/commit
unlog: Don't overflow cells array
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 1 Mar 2013 11:31:31 +0000 (11:31 +0000)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 22 Mar 2013 13:00:21 +0000 (06:00 -0700)
commitd3dca0b7dd7874dee01065e04eccd68a63fc1493
treea2a7b0e0d3b2fda52493d971aa0909cb8fc8d07a
parent9fc38b1bcdfd7c16fc84f88314d7b9ec0f084b18
unlog: Don't overflow cells array

cells has a maximum size of MAXCELLS. Doing cells[MAXCELLS] overflows
that array. Clamp our maximum number of cells at one below this to
avoid the overflow.

Caught by coverity (#98551)

Reviewed-on: http://gerrit.openafs.org/9324
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit ff7fd58b49a41bf85df492b9f470004d4433800e)

Change-Id: If6c0caed4b4fedf571c4c6c6b8466bfaaff67975
Reviewed-on: http://gerrit.openafs.org/9374
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/log/unlog.c