diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-15 18:25:15 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-15 18:25:15 +0200 |
| commit | 90a28d26fd6037069495744a3a6a263ed1bede99 (patch) | |
| tree | d559a8dbdb8e50ba474ee37b31d8b7e5f7e87b8a /Sources | |
| parent | 180b333debbd1e555fbab5191656e2146dff6e8a (diff) | |
unstable:patch: Fix UB which was strlen(**"import" + 1**)
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Sources')
| -rw-r--r-- | Sources/ppcasm.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Sources/ppcasm.cc b/Sources/ppcasm.cc index b010cf5..eadedec 100644 --- a/Sources/ppcasm.cc +++ b/Sources/ppcasm.cc @@ -313,7 +313,7 @@ static bool asm_read_attributes(std::string &line) { throw std::runtime_error("invalid_import_bin"); } - auto name = line.substr(line.find("import") + strlen("import" + 1)); + auto name = line.substr(line.find("import") + strlen("import") + 1); std::string result = std::to_string(name.size()); result += kUndefinedSymbol; |
