[PATCH] jffs2: refactor csize in jffs2_do_read_inode_internal()
Artem Bityutskiy
dedekind1 at gmail.com
Sun Apr 22 07:57:51 EDT 2012
On Mon, 2012-04-09 at 18:42 -0400, Xi Wang wrote:
> Replace the verbose `je32_to_cpu(latest_node->csize)' with a shorter
> variable `csize'.
>
> Also check for a bogus `csize' value 0xffffffff, which would turn the
> subsequent kmalloc(cisze + 1, ...) into kmalloc(0, ...).
>
> Signed-off-by: Xi Wang <xi.wang at gmail.com>
Please, introduce the variable in a separate patch.
WRT the csize check - you should compare it to something more sensible
than INT_MAX - try to dig the code and find out what is maximum value
JFFS2 expects.
--
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120422/2d48d44d/attachment.sig>
More information about the linux-mtd
mailing list