aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJohannes Schickel2010-05-05 17:54:12 +0000
committerJohannes Schickel2010-05-05 17:54:12 +0000
commitcaf31ee5afb61a88342176473bf77ebddc098ca4 (patch)
treebc0ec2794958a722d314af38c00d65a9a058b0cf /common
parent7da8c8949b56835cf87f88ffd6cfb8204c711592 (diff)
downloadscummvm-rg350-caf31ee5afb61a88342176473bf77ebddc098ca4.tar.gz
scummvm-rg350-caf31ee5afb61a88342176473bf77ebddc098ca4.tar.bz2
scummvm-rg350-caf31ee5afb61a88342176473bf77ebddc098ca4.zip
Replace various strncpy usages by strlcpy.
svn-id: r48955
Diffstat (limited to 'common')
-rw-r--r--common/unarj.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/common/unarj.cpp b/common/unarj.cpp
index 27399036e1..c130533dc1 100644
--- a/common/unarj.cpp
+++ b/common/unarj.cpp
@@ -303,9 +303,8 @@ ArjHeader *readHeader(SeekableReadStream &stream) {
return NULL;
}
- strncpy(header.filename, (const char *)&headData[header.firstHdrSize], ARJ_FILENAME_MAX);
-
- strncpy(header.comment, (const char *)&headData[header.firstHdrSize + strlen(header.filename) + 1], ARJ_COMMENT_MAX);
+ Common::strlcpy(header.filename, (const char *)&headData[header.firstHdrSize], ARJ_FILENAME_MAX);
+ Common::strlcpy(header.comment, (const char *)&headData[header.firstHdrSize + strlen(header.filename) + 1], ARJ_COMMENT_MAX);
// Process extended headers, if any
uint16 extHeaderSize;