summaryrefslogtreecommitdiffhomepage
path: root/Sources
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-04-15 18:25:15 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-04-15 18:25:15 +0200
commit90a28d26fd6037069495744a3a6a263ed1bede99 (patch)
treed559a8dbdb8e50ba474ee37b31d8b7e5f7e87b8a /Sources
parent180b333debbd1e555fbab5191656e2146dff6e8a (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.cc2
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;