Re: [PATCH] i2o: avoid returning pointer to a local array inchtostr()

From: Alan Cox
Date: Thu Jun 14 2012 - 10:01:39 EST


On Thu, 14 Jun 2012 14:51:42 +0200
Kamil Dudka <kdudka@xxxxxxxxxx> wrote:

> The pointer returned from chtostr() points to an array which is no longer valid
> when being used in the calling function. Although it may work, the behavior is
> undefined. Detected by cppcheck.
>
> Signed-off-by: Kamil Dudka <kdudka@xxxxxxxxxx>

Acked-by: Alan Cox <alan@xxxxxxxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/