aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/tidspbridge
diff options
context:
space:
mode:
authorOmar Ramirez Luna <omar.ramirez@copitl.com>2013-01-10 03:36:59 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-17 16:47:13 -0800
commit94c947cd4ec7c886df246f87255dc925e3a0a47f (patch)
tree6fd8f06d314c63e5a3bebcb72521e12141ea6515 /drivers/staging/tidspbridge
parent7c256647b5ef8094ca3a6f43a442d6d8aac18058 (diff)
staging: tidspbridge: fix memory corruption on long string names
The value allocated doesn't match the one that is meant to be stored, resulting in corruption of memory for longer strings that can't be held in such space. Fix by allocating the correct byte value for the string meant to be stored. Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/tidspbridge')
-rw-r--r--drivers/staging/tidspbridge/rmgr/dbdcd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/tidspbridge/rmgr/dbdcd.c b/drivers/staging/tidspbridge/rmgr/dbdcd.c
index 9d52c3cb92f..3d2a26f1efe 100644
--- a/drivers/staging/tidspbridge/rmgr/dbdcd.c
+++ b/drivers/staging/tidspbridge/rmgr/dbdcd.c
@@ -852,8 +852,7 @@ int dcd_register_object(struct dsp_uuid *uuid_obj,
goto func_end;
}
- dcd_key->path = kmalloc(strlen(sz_reg_key) + 1,
- GFP_KERNEL);
+ dcd_key->path = kmalloc(dw_path_size, GFP_KERNEL);
if (!dcd_key->path) {
kfree(dcd_key);