udf: potential integer overflow
authorDan Carpenter <error27@gmail.com>
Mon, 15 Mar 2010 08:21:13 +0000 (11:21 +0300)
committerJan Kara <jack@suse.cz>
Thu, 8 Apr 2010 13:35:20 +0000 (15:35 +0200)
commit69ecbbedac8e353bbd924fad16fed0c7c54e6382
treef008c3ad0750585ea3d403718251922f215cb626
parent0fdf86754f70e813845af4abaa805165ce57a0bb
udf: potential integer overflow

bloc->logicalBlockNum is unsigned so it's never less than zero.

When I saw that, it made me worry that "bloc->logicalBlockNum + count"
could overflow.  That's why I changed the check for less than zero
to an overflow check.  (The test works because "count" is also
unsigned.)

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/balloc.c