]> git.michaelhowe.org Git - packages/o/openafs.git/commit
ubik: Don't overflow server's addr array
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 1 Mar 2013 11:47:03 +0000 (11:47 +0000)
committerDerrick Brashear <shadow@your-file-system.com>
Mon, 4 Mar 2013 03:02:55 +0000 (19:02 -0800)
commita4ae9a4c3cc1fa5ca2b813174040dce36284a4b9
tree96e662d8ddf5ac3116ac1d67c090bcd930f16064
parenta1d8109c8fa8c10e3ce5ed67cda03b3b557608ff
ubik: Don't overflow server's addr array

We're checking to see if we've overflowed the array _after_ we've
looked up an element within it - so on the final iteration, we
always read past the end of the array.

Fix this by swapping the order of the tests in the for statemen

Caught by coverity (#985590)

Change-Id: Ibbf0eb88083166f0a23316edf0612e94593c07ce
Reviewed-on: http://gerrit.openafs.org/9326
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
src/ubik/recovery.c