mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
vol: Correct VolumeNumber for large volume IDs
VolumeNumber was using atoi to convert a volume header name to a
volume ID. This can return just -1 for volume IDs larger than 2^31-1,
though, so use strtoul instead.
Reviewed-on: http://gerrit.openafs.org/4199
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 0f1c921fa1
)
Change-Id: Ib56d3f77f0d90f5ad55b3c0de89632d271436f7e
Reviewed-on: http://gerrit.openafs.org/4284
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
4d691ae109
commit
911b258304
@ -6058,7 +6058,7 @@ VolumeNumber(char *name)
|
||||
{
|
||||
if (*name == OS_DIRSEPC)
|
||||
name++;
|
||||
return atoi(name + 1);
|
||||
return strtoul(name + 1, NULL, 10);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user