mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-04 19:53:48 +01:00
Switch strncpy to truncate_cpy in a bunch of places.
This commit is contained in:
1 parent
083f7ff280
commit
21fe73c8e7
9 files changed
+22
-19
No files matched your search
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "MemoryUtil.h"
|
||||
#include "MemArena.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
@@ -49,7 +50,7 @@ static int ashmem_create_region(const char *name, size_t size) {
|
||||
int ret;
|
||||
if (name) {
|
||||
char buf[ASHMEM_NAME_LEN];
|
||||
strncpy(buf, name, sizeof(buf));
|
||||
truncate_cpy(buf, name);
|
||||
ret = ioctl(fd, ASHMEM_SET_NAME, buf);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
Reference in new issue
Block a user