From caf31ee5afb61a88342176473bf77ebddc098ca4 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 5 May 2010 17:54:12 +0000 Subject: Replace various strncpy usages by strlcpy. svn-id: r48955 --- common/unarj.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'common') 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; -- cgit v1.2.3