Skip to content

Commit

Permalink
remove getString, which is not used, and was insecure to boot (#1966)
Browse files Browse the repository at this point in the history
  • Loading branch information
kripken authored Mar 26, 2019
1 parent 56c5ff7 commit 596ad82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/wasm-binary.h
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,8 @@ class WasmBinaryBuilder {

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();
Expand All @@ -979,7 +980,6 @@ class WasmBinaryBuilder {
int64_t getS64LEB();
Type getType();
Type getConcreteType();
Name getString();
Name getInlineString();
void verifyInt8(int8_t x);
void verifyInt16(int16_t x);
Expand Down
8 changes: 0 additions & 8 deletions src/wasm/wasm-binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 596ad82

Please sign in to comment.