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

Eric Sandeen sandeen at sandeen.net
Mon Jan 23 23:07:35 CST 2012


On 1/23/12 1:59 PM, Christoph Hellwig wrote:
> 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?

sure... I have quite a backlog of tests I need to get pushed to git :(

Is that an ack for the patch, though? :)

-Eric




More information about the xfs mailing list