ACK: [PATCH] acpi: method: check for NULL buf before dereferencing it (LP: #1205267)
Alex Hung
alex.hung at canonical.com
Mon Jul 29 08:14:22 UTC 2013
On 07/26/2013 05:54 PM, Colin King wrote:
> From: Colin Ian King <colin.king at 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 at 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 at canonical.com>
More information about the fwts-devel
mailing list