libadmin/vos/vosutils.c: mask out sign-extension
authorNickolai Zeldovich <nickolai@csail.mit.edu>
Sun, 6 Jan 2013 04:45:59 +0000 (23:45 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Sun, 6 Jan 2013 16:35:09 +0000 (08:35 -0800)
commit8e8e3c26b87d78b92d96ba91d58ee59d774ebcb5
treee506daa80c4718877845b5cbc8e9fc813c52781d
parentbd850e5b980d34236ee98d16b9717860b63af306
libadmin/vos/vosutils.c: mask out sign-extension

Right-shifting a signed int by 24 bits can produce a value outside of
0..0xff due to sign-extension.  As a result, in AddressMatch(), the
first bPattern!=255 check can never succeed.  Fix by masking with 255
before comparison.

Change-Id: Idb0b4c176ff120c7cf0e03a935ebfdca51084bbd
Reviewed-on: http://gerrit.openafs.org/8884
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/libadmin/vos/vosutils.c