Messages in this thread | | | Date | Sun, 28 Sep 2014 11:56:04 +0100 | From | Mark Brown <> | Subject | Re: [PATCH] regmap: fix possible ZERO_SIZE_PTR pointer dereferencing error. |
| |
On Sun, Sep 28, 2014 at 05:09:54PM +0800, Xiubo Li wrote: > Since we cannot make sure the 'val_count' will always be none zero > here, and then if it equals to zero, the kmemdup() will return > ZERO_SIZE_PTR, which equals to ((void *)16).
Applied, thanks.
> diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c > index 455a877..3d93e38 100644 > --- a/drivers/base/regmap/regmap.c > +++ b/drivers/base/regmap/regmap.c > @@ -1716,6 +1716,9 @@ out:
Whatever you're using to generate the patches isn't annotating with the function being changed like git normally does which isn't great for working out what the best return value should be. [unhandled content-type:application/pgp-signature] | |