17 Apr
2015
17 Apr
'15
3:46 p.m.
On Fri, Apr 17, 2015 at 02:42:05PM +0200, Takashi Iwai wrote:
At Fri, 17 Apr 2015 15:35:15 +0300, Dan Carpenter wrote:
This function is a bit unusual because it accepts negative values as "conn_len". It's theoretically possible for both "cache_len" and "conn_len" to be -ENOSPC and in that case we would oops trying to run memcmp() on the uninitialized "list" pointer.
Yes, that's a bug. But the check should be rather:
if (cache_len >= 0 && (cache_len != conn_len || memcmp(list, conn, conn_len) != 0))
Could you resend with this fix?
Sure. Will do.
regards, dan carpenter