xfs
[Top] [All Lists]

Re: [PATCH] xfsprogs: check for size parsing errors in xfs_quota

To: Eric Sandeen <sandeen@xxxxxxxxxx>
Subject: Re: [PATCH] xfsprogs: check for size parsing errors in xfs_quota
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 23 Jan 2012 14:59:22 -0500
Cc: xfs-oss <xfs@xxxxxxxxxxx>, James Lawrie <james@xxxxxxxxxxxxxx>
In-reply-to: <4F1D9989.8060808@xxxxxxxxxx>
References: <4F1D9989.8060808@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Jan 23, 2012 at 11:31:53AM -0600, Eric Sandeen wrote:
> Doing something like 
> 
> # xfs_quota -x -c 'limit -u bhard=1.2g ...
> 
> will cause cvtnum to fail and return a value of -1LL (because it
> cannot parse the decimal), but the quota caller doesn't check
> for this error value, casts it to U64, shifts right, and we end
> up with an answer of 16 petabytes rather than erroring out.
> Fix this.

Can you add a test case for it, please?

<Prev in Thread] Current Thread [Next in Thread>