[PATCH] devicetree/dt_sysinfo: report FWTS_ERROR on non-null termimated property
Colin King
colin.king at canonical.com
Sat Jun 4 15:45:58 UTC 2016
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;
--
2.8.1
More information about the fwts-devel
mailing list