device: Fix memory corruption in device_list_alloc_to_bufs
This commit is contained in:
1 parent
def1d49ab4
commit
1776315097
1 file changed
+1
-1
+1
-1
@@ -215,7 +215,7 @@ char ** device_list_alloc_to_bufs(const struct device_list * device_list) {
|
|||||||
while ( device_first->hwrevs[i+1] != -1 ) {
|
while ( device_first->hwrevs[i+1] != -1 ) {
|
||||||
|
|
||||||
uint8_t len = 0;
|
uint8_t len = 0;
|
||||||
ret[j] = last_ptr;
|
ret[j] = ++last_ptr;
|
||||||
|
|
||||||
strncpy(ret[j]+1, device, 16);
|
strncpy(ret[j]+1, device, 16);
|
||||||
last_ptr += 16;
|
last_ptr += 16;
|
||||||
|
|||||||
Reference in new issue
Block a user