[PATCH 01/12] lib: fwts_tag: use strncpy instead of strcpy
Colin King
colin.king at canonical.com
Sun Nov 4 22:19:39 UTC 2012
From: Colin Ian King <colin.king at canonical.com>
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/lib/src/fwts_tag.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/src/fwts_tag.c b/src/lib/src/fwts_tag.c
index d8e9dad..daf9b46 100644
--- a/src/lib/src/fwts_tag.c
+++ b/src/lib/src/fwts_tag.c
@@ -164,7 +164,7 @@ char *fwts_tag_list_to_str(fwts_list *taglist)
} else {
if ((str = malloc(len)) == NULL)
return NULL;
- strcpy(str, tag);
+ strncpy(str, tag, len);
}
}
return str;
--
1.7.10.4
More information about the fwts-devel
mailing list