From 1776315097727e3d30aca16c9b7113b5f604474f Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Sat, 24 Nov 2012 12:55:48 +0100 Subject: device: Fix memory corruption in device_list_alloc_to_bufs --- src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/device.c') diff --git a/src/device.c b/src/device.c index 787d2a9..593e4b9 100644 --- a/src/device.c +++ b/src/device.c @@ -215,7 +215,7 @@ char ** device_list_alloc_to_bufs(const struct device_list * device_list) { while ( device_first->hwrevs[i+1] != -1 ) { uint8_t len = 0; - ret[j] = last_ptr; + ret[j] = ++last_ptr; strncpy(ret[j]+1, device, 16); last_ptr += 16; -- cgit v1.2.3