mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-11 15:40:50 +00:00
misc: st_kim: Increase size of dev_name buffer to incorporate termination
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. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e4ebe5fe2d
commit
ffdbb715fa
@ -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;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user