Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Archive/MachoHandler.cpp')
-rwxr-xr-xCPP/7zip/Archive/MachoHandler.cpp8
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;
}