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/Loop.cpp b/Loop.cpp index ca26093..1ed5bd0 100644 --- a/Loop.cpp +++ b/Loop.cpp
@@ -121,7 +121,7 @@ errno = ENOENT; return -1; } - strncpy(buffer, filename, len -1); + strlcpy(buffer, filename, len); return 0; } @@ -191,7 +191,7 @@ return -1; } - strncpy(loopDeviceBuffer, filename, len -1); + strlcpy(loopDeviceBuffer, filename, len); int file_fd;