[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yx8/eKbkOs8AwGpK@kadam>
Date: Mon, 12 Sep 2022 17:17:28 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Nam Cao <namcaov@...il.com>
Cc: forest@...ttletooquiet.net, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org, linux-staging@...ts.linux.dev
Subject: Re: [PATCH] staging: vt6655: fix potential memory leak
On Fri, Sep 09, 2022 at 04:42:05PM +0200, Nam Cao wrote:
> I did not realize this initially, but this bug can cause more serious problem
> than just a memory leak. In the case that kzalloc fails right from the
> beginning with i=0; then in the while loop, "i" will wrap around and the code
> will access priv->apTD0Rings[4294967295] which is obviously not good.
>
True. You probably want to resend with that added to the commit
message. I will create a Smatch check to prevent these in the future.
regards,
dan carpenter
Powered by blists - more mailing lists