[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fwts-devel
Subject:    ACK: [PATCH] acpi: method: check for NULL buf before dereferencing it (LP: #1205267)
From:       Alex Hung <alex.hung () canonical ! com>
Date:       2013-07-29 8:14:22
Message-ID: 51F6245E.1050505 () canonical ! com
[Download RAW message or body]

On 07/26/2013 05:54 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> There may be a possibility that buf is NULL, so check for this
> before dereferencing it.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> src/acpi/method/method.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index 628ead6..f46fdff 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -681,7 +681,7 @@ static void method_test_NULL_return(
> 		}
> 	}
> 
> -	if (buf->Length && buf->Pointer) {
> +	if (buf && buf->Length && buf->Pointer) {
> 		fwts_failed(fw, LOG_LEVEL_MEDIUM, "MethodShouldReturnNothing", "%s returned \
> values, but was expected to return nothing.", name);  fwts_tag_failed(fw, \
> FWTS_TAG_ACPI_METHOD_RETURN);  fwts_log_info(fw, "Object returned:");
> 

Acked-by: Alex Hung <alex.hung@canonical.com>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic