ACK: [PATCH] acpi: powerbutton: ensure we don't get scanf buffer overflow
Alex Hung
alex.hung at canonical.com
Tue Jan 14 02:11:30 UTC 2014
On 01/09/2014 11:24 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/acpi/powerbutton/powerbutton.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/acpi/powerbutton/powerbutton.c b/src/acpi/powerbutton/powerbutton.c
> index b67cbcd..5bf14a7 100644
> --- a/src/acpi/powerbutton/powerbutton.c
> +++ b/src/acpi/powerbutton/powerbutton.c
> @@ -62,7 +62,7 @@ static int power_button_test1(fwts_framework *fw)
> else {
> char button[4096];
> memset(button, 0, sizeof(button));
> - sscanf(buffer, "%*s %s", button);
> + sscanf(buffer, "%*s %4095s", button);
>
> fwts_passed(fw, "Detected %s power button event.", button);
> }
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list