misc: st_kim: Increase size of dev_name buffer to incorporate termination
authorLee Jones <lee.jones@linaro.org>
Wed, 13 Aug 2014 11:45:19 +0000 (12:45 +0100)
committerLee Jones <lee.jones@linaro.org>
Fri, 26 Sep 2014 07:15:29 +0000 (08:15 +0100)
Calling strncpy with a maximum size argument of 32 bytes on destination
array kim_gdata->dev_name of size 32 bytes might leave the destination
string unterminated.

Cc: gregkh@linuxfoundation.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
include/linux/ti_wilink_st.h

index 932b7639224883535456c37c1d30801ec6f7b305..884d6263e962499483f40b4dd29e9d99393ad799 100644 (file)
@@ -268,7 +268,7 @@ struct kim_data_s {
        struct st_data_s *core_data;
        struct chip_version version;
        unsigned char ldisc_install;
-       unsigned char dev_name[UART_DEV_NAME_LEN];
+       unsigned char dev_name[UART_DEV_NAME_LEN + 1];
        unsigned char flow_cntrl;
        unsigned long baud_rate;
 };
This page took 0.026697 seconds and 5 git commands to generate.