salvager: Do not abort on large volume IDs
authorAndrew Deason <adeason@sinenomine.net>
Thu, 10 Mar 2011 20:55:50 +0000 (14:55 -0600)
committerDerrick Brashear <shadow@dementia.org>
Wed, 16 Mar 2011 14:35:32 +0000 (07:35 -0700)
commitd3e2b09a00edb265b5486e617cd6500cdbae4178
tree2c7d76dfc93684d00ae2304d87d1d34fd2aa48a7
parent8c56218c6b7413b2de619d13fa40970c94db9f6a
salvager: Do not abort on large volume IDs

The salvager was parsing volume IDs just using atoi() and checking if
the result was negative. Since the result is a signed int, this fails
on any volume ID larger than 2^31-1. Change the parser to use strtoul
instead of atoi, and change the check.

Reviewed-on: http://gerrit.openafs.org/4196
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 0884e9d0fddf2be81abf6468209048331efa8a1e)

Change-Id: If9cb63aaf6530ea7558e6036bce250328573e2e5
Reviewed-on: http://gerrit.openafs.org/4209
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/vol/vol-salvage.c