ubik/udebug.c, vol/vol-info.c: check array index before dereferencing
authorNickolai Zeldovich <nickolai@csail.mit.edu>
Sun, 6 Jan 2013 04:44:55 +0000 (23:44 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Sun, 6 Jan 2013 16:34:33 +0000 (08:34 -0800)
commit0e83cde60e6e91fbe20ffac0f0a77afe8497d950
treeb50c2f5b7242ddbbeb7cbc775cbc14d8c5d20d14
parent5c5515a5c3b34f9a115b29378e123c779c138f51
ubik/udebug.c, vol/vol-info.c: check array index before dereferencing

Avoid out-of-bounds array accesses by first checking that the index
is in-bounds, and then dereferencing; not the other way around.

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