aboutsummaryrefslogtreecommitdiff
path: root/common/unarj.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/unarj.cpp')
-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;