On 09/11/2012 01:31 PM, Eugene Shatokhin wrote:
> Hi, Alexey,
>
> Thank you for pointing this out.
>
> Yes, __krealloc() may return ZERO_SIZE_PTR and this case should be
> handled. Perhaps, kmemdup() with len == 0 may do that too. I cannot
> say if it is legal to call it this way but OK, assume it may happen.
That was the cause of a false positive during my testing.
>
> However, I cannot see from the sources of kstrdup() and kstrndup() how
> these functions can return ZERO_SIZE_PTR. Any ideas?
Agree, it is a consequence of initial opening kstrdup.data instead of
kmemdup.data.
--
Alexey