[PATCH] wmi: Fix an error on processing the _WDG data
Colin Ian King
colin.king at canonical.com
Fri Apr 20 08:16:09 UTC 2012
On 20/04/12 09:05, Keng-Yu Lin wrote:
> On processing the final element (the 8-th) of the raw _WDG data,
> the pointer is not incremented. This causes the loss of the final
> element and incorrect parsing result.
>
> Signed-off-by: Keng-Yu Lin<kengyu at canonical.com>
> ---
> src/acpi/wmi/wmi.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/acpi/wmi/wmi.c b/src/acpi/wmi/wmi.c
> index de353c6..5a188eb 100644
> --- a/src/acpi/wmi/wmi.c
> +++ b/src/acpi/wmi/wmi.c
> @@ -219,7 +219,10 @@ static void wmi_get_wdg_data(fwts_framework *fw,
> str+=4;
> if (*str != ',') break;
> str++;
> - if (!isspace(*str)) break;
> + if (!isspace(*str)) {
> + data++;
> + break;
> + }
> str++;
> data++;
> if (data> wdg_data + size) {
Well spotted. Thanks!
Acked-by: Colin Ian King <colin.king at canonical.com>
More information about the fwts-devel
mailing list