fsl_qbman: qman_debugfs: initialize buffer
authorFlorinel Iordache <florinel.iordache@nxp.com>
Mon, 26 Apr 2021 08:12:53 +0000 (11:12 +0300)
committerFlorinel Iordache <florinel.iordache@nxp.com>
Mon, 26 Apr 2021 12:53:13 +0000 (14:53 +0200)
Fix Coverity issue Untrusted value as argument: tainted_argument: Calling function copy_from_user taints argument *buf

Signed-off-by: Florinel Iordache <florinel.iordache@nxp.com>
drivers/staging/fsl_qbman/qman_debugfs.c

index afdc939..dc5175f 100644 (file)
@@ -163,7 +163,7 @@ static const struct mask_to_text stashing_text_list[] = {
 static int user_input_convert(const char __user *user_buf, size_t count,
                                unsigned long *val)
 {
-       char buf[12];
+       char buf[12] = {0};
 
        if (count > sizeof(buf) - 1)
                return -EINVAL;