commit | 2152266deb82f96ef5a22d3a56a76bf6177e1e04 | [log] [tgz] |
---|---|---|
author | Henrik Baard <henrik.baard@sonymobile.com> | Fri Feb 06 09:24:14 2015 +0100 |
committer | Henrik Baard <henrik.baard@sonymobile.com> | Fri Feb 06 09:24:14 2015 +0100 |
tree | c51cb7fca2edce2a44ebdbcff50d49715526937c | |
parent | f3b2637e0611ac7953c18ce39a47b7c408a70160 [diff] [blame] |
Change strncpy to strlcpy Change all function calls to strncpy to strlcpy. Change-Id: I2bbefb7829d715847c5b26f4b9f0faddbd4c89d0
diff --git a/vdc.c b/vdc.c index dcd2bc3..6927e92 100644 --- a/vdc.c +++ b/vdc.c
@@ -145,8 +145,7 @@ int code; char tmp[4]; - strncpy(tmp, buffer + offset, 3); - tmp[3] = '\0'; + strlcpy(tmp, buffer + offset, sizeof(tmp)); code = atoi(tmp); printf("%s\n", buffer + offset);