projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c20316
)
[Support] Don't initialize buffer allocated by zlib::uncompress
author
Benjamin Kramer
<benny.kra@googlemail.com>
Sun, 3 May 2020 12:52:19 +0000
(14:52 +0200)
committer
Benjamin Kramer
<benny.kra@googlemail.com>
Sun, 3 May 2020 13:01:52 +0000
(15:01 +0200)
This is a somewhat annoying API, but not without precedend in this low
level API.
llvm/lib/Support/Compression.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Support/Compression.cpp
b/llvm/lib/Support/Compression.cpp
index
97d5ffa
..
27d92f0
100644
(file)
--- a/
llvm/lib/Support/Compression.cpp
+++ b/
llvm/lib/Support/Compression.cpp
@@
-74,10
+74,10
@@
Error zlib::uncompress(StringRef InputBuffer, char *UncompressedBuffer,
Error zlib::uncompress(StringRef InputBuffer,
SmallVectorImpl<char> &UncompressedBuffer,
size_t UncompressedSize) {
- UncompressedBuffer.res
iz
e(UncompressedSize);
+ UncompressedBuffer.res
erv
e(UncompressedSize);
Error E =
uncompress(InputBuffer, UncompressedBuffer.data(), UncompressedSize);
- UncompressedBuffer.
re
size(UncompressedSize);
+ UncompressedBuffer.
set_
size(UncompressedSize);
return E;
}