ACK: [PATCH] devicetree/dt_sysinfo: report FWTS_ERROR on non-null termimated property

Alex Hung alex.hung at canonical.com
Wed Jun 8 00:14:32 UTC 2016


On 2016-06-04 11:45 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> The current error handling for a non-null terminated property sets
> rc to FWTS_ERROR but then falls through to the FWTS_OK return path
> and so never reports a failure.  Fix this by jumping to the out
> label so FWTS_ERROR is returned.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/devicetree/dt_sysinfo/dt_sysinfo.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/src/devicetree/dt_sysinfo/dt_sysinfo.c b/src/devicetree/dt_sysinfo/dt_sysinfo.c
> index 1119d6d..593c496 100644
> --- a/src/devicetree/dt_sysinfo/dt_sysinfo.c
> +++ b/src/devicetree/dt_sysinfo/dt_sysinfo.c
> @@ -61,6 +61,7 @@ static int check_property_printable(fwts_framework *fw, const char *name,
>   		fwts_failed(fw, LOG_LEVEL_LOW, "DTPrintablePropertyNoNul",
>   				"property %s isn't nul-terminated", name);
>   		rc = FWTS_ERROR;
> +		goto out;
>   	}
>
>   	rc = FWTS_OK;
>

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



More information about the fwts-devel mailing list