summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2019-03-26 14:53:07 -0700
committerGitHub <noreply@github.com>2019-03-26 14:53:07 -0700
commit596ad8288827bd68e7f0fd2e632b9f37f47a36a6 (patch)
tree32d76433efae5e4ea596325361dba2f7927753e5 /src
parent56c5ff78310ad956e70bf1a00a64c72ee81d18bd (diff)
downloadbinaryen-596ad8288827bd68e7f0fd2e632b9f37f47a36a6.tar.gz
binaryen-596ad8288827bd68e7f0fd2e632b9f37f47a36a6.tar.bz2
binaryen-596ad8288827bd68e7f0fd2e632b9f37f47a36a6.zip
remove getString, which is not used, and was insecure to boot (#1966)
Diffstat (limited to 'src')
-rw-r--r--src/wasm-binary.h4
-rw-r--r--src/wasm/wasm-binary.cpp8
2 files changed, 2 insertions, 10 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 32166af00..66c95299e 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -962,7 +962,8 @@ public:
void read();
void readUserSection(size_t payloadLen);
- bool more() { return pos < input.size();}
+
+ bool more() { return pos < input.size(); }
uint8_t getInt8();
uint16_t getInt16();
@@ -979,7 +980,6 @@ public:
int64_t getS64LEB();
Type getType();
Type getConcreteType();
- Name getString();
Name getInlineString();
void verifyInt8(int8_t x);
void verifyInt16(int16_t x);
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp
index 7aeb80715..02987f5f7 100644
--- a/src/wasm/wasm-binary.cpp
+++ b/src/wasm/wasm-binary.cpp
@@ -862,14 +862,6 @@ Type WasmBinaryBuilder::getConcreteType() {
return type;
}
-Name WasmBinaryBuilder::getString() {
- if (debug) std::cerr << "<==" << std::endl;
- size_t offset = getInt32();
- Name ret = cashew::IString((&input[0]) + offset, false);
- if (debug) std::cerr << "getString: " << ret << " ==>" << std::endl;
- return ret;
-}
-
Name WasmBinaryBuilder::getInlineString() {
if (debug) std::cerr << "<==" << std::endl;
auto len = getU32LEB();