From 911b2583045bf1609b7f04571cbfd8b3c1df0389 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Thu, 10 Mar 2011 18:37:44 -0600 Subject: [PATCH] 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 Reviewed-by: Derrick Brashear (cherry picked from commit 0f1c921fa1738c383fd576e287f356dd13f92a58) Change-Id: Ib56d3f77f0d90f5ad55b3c0de89632d271436f7e Reviewed-on: http://gerrit.openafs.org/4284 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/vol/volume.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vol/volume.c b/src/vol/volume.c index 530925ea40..cf1c2bf85b 100644 --- a/src/vol/volume.c +++ b/src/vol/volume.c @@ -6058,7 +6058,7 @@ VolumeNumber(char *name) { if (*name == OS_DIRSEPC) name++; - return atoi(name + 1); + return strtoul(name + 1, NULL, 10); } /**