[patch] staging: rtl8712: memory corruption in wpa_set_encryption()

2016-01-30 Thread Dan Carpenter
->KeyMaterial is declared as a 16 byte array, but we only ever allocate either 5 or 13 bytes of it. The problem is that we memset() all 16 bytes to zero so we're memsetting past the end of the allocated memory. I fixed this in slightly lazy way, by just allocating 16 bytes. This works but there

Re: [patch] staging: rtl8712: memory corruption in wpa_set_encryption()

2016-01-30 Thread Joshua Clayton
On Saturday, January 30, 2016 05:41:10 PM Dan Carpenter wrote: > ->KeyMaterial is declared as a 16 byte array, but we only ever allocate > either 5 or 13 bytes of it. The problem is that we memset() all 16 > bytes to zero so we're memsetting past the end of the allocated memory. > > I fixed this