diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2009-02-03 03:00:00 +0300 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:15:59 +0300 |
commit | 8874e4fbc9faabdcff719b9b2ac8ebad4f282bbe (patch) | |
tree | 4180f817b3d10dc34cde8b7ccc8c589eae4b26d3 /CPP/7zip/Archive/MachoHandler.cpp | |
parent | 1dc92281fa580c11a79fef9fc862a6ce354a76ac (diff) |
4.654.65
Diffstat (limited to 'CPP/7zip/Archive/MachoHandler.cpp')
-rwxr-xr-x | CPP/7zip/Archive/MachoHandler.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/CPP/7zip/Archive/MachoHandler.cpp b/CPP/7zip/Archive/MachoHandler.cpp index f3ccadf5..76f63a21 100755 --- a/CPP/7zip/Archive/MachoHandler.cpp +++ b/CPP/7zip/Archive/MachoHandler.cpp @@ -308,11 +308,9 @@ STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) static AString GetName(const char *name) { - AString res; - char *p = res.GetBuffer(kNameSize); - strncpy(p, name, kNameSize); - p[kNameSize] = 0; - res.ReleaseBuffer(); + char res[kNameSize + 1]; + memcpy(res, name, kNameSize); + res[kNameSize] = 0; return res; } |