diff options
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; } |