X-Git-Url: http://git.onelab.eu/?p=util-vserver-pl.git;a=blobdiff_plain;f=src%2Fplanetlab.c;h=db9c4303b37ba470e1e73a4a785bd53344765445;hp=90ba4dd278cd912463cce36e7b18837fbd2b61e9;hb=7e7bb8278e154e417c62c0fcfff4c152e8015edb;hpb=a4750b971298b0b51f8db259b7f8f5976ee461d5 diff --git a/src/planetlab.c b/src/planetlab.c index 90ba4dd..db9c430 100644 --- a/src/planetlab.c +++ b/src/planetlab.c @@ -356,8 +356,13 @@ pl_get_limits(const char *context, struct sliver_resources *slr) buf[len-1]='\0'; len --; } - if ( (r->type == TYPE_LONG) && isdigit(*buf)) { - *r->limit = atoi(buf); + if (r->type == TYPE_LONG) { + int val; + char *res=0; + errno=0; + val = strtol(buf,&res,0); + if ( !( (val==0 && res) || (errno!=0) ) ) + *r->limit = val; } else if ( (r->type == TYPE_PERS) && isalpha(*buf)) { unsigned long int res; res = vc_str2personalitytype(buf,len);