mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
staging: fbtft: Fix buffer overflow vulnerability
Module copies a user supplied string (module parameter) into a buffer using strncpy() and does not check that the buffer is null terminated. Replace call to strncpy() with call to strlcpy() ensuring that the buffer is null terminated. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ca5af1f303
commit
8414fe11ba
1 changed files with 1 additions and 1 deletions
|
|
@ -1483,7 +1483,7 @@ static int __init fbtft_device_init(void)
|
|||
displays[i].pdev->name = name;
|
||||
displays[i].spi = NULL;
|
||||
} else {
|
||||
strncpy(displays[i].spi->modalias, name, SPI_NAME_SIZE);
|
||||
strlcpy(displays[i].spi->modalias, name, SPI_NAME_SIZE);
|
||||
displays[i].pdev = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue