summaryrefslogtreecommitdiffstats
path: root/src/device.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2012-11-24 12:55:48 +0100
committerPali Rohár <pali.rohar@gmail.com>2012-11-24 12:55:48 +0100
commit1776315097727e3d30aca16c9b7113b5f604474f (patch)
tree4bd490b4be2ea32fcdc3de16bfd92a8def27eced /src/device.c
parentdef1d49ab46f88f6ebeda162978eed46d4766c35 (diff)
download0xFFFF-1776315097727e3d30aca16c9b7113b5f604474f.tar.bz2
device: Fix memory corruption in device_list_alloc_to_bufs
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c2
1 files changed, 1 insertions, 1 deletions
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;