summaryrefslogtreecommitdiff
path: root/tools/scaninc/asm_file.cpp
diff options
context:
space:
mode:
authorcamthesaxman <cameronghall@cox.net>2017-07-28 17:07:01 -0500
committercamthesaxman <cameronghall@cox.net>2017-07-28 17:07:01 -0500
commit0a856fda0c19c5090b8a2ccaab7099147c287faa (patch)
treecd4c25307f51c2c0a720f1b672d6ca1ebcad1983 /tools/scaninc/asm_file.cpp
parentbb0cad7c072703f5a540e8c22c8e137267331f4d (diff)
fix std::string buffer overflow in scaninc
Diffstat (limited to 'tools/scaninc/asm_file.cpp')
-rw-r--r--tools/scaninc/asm_file.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/scaninc/asm_file.cpp b/tools/scaninc/asm_file.cpp
index c3d140bb1..6322749e2 100644
--- a/tools/scaninc/asm_file.cpp
+++ b/tools/scaninc/asm_file.cpp
@@ -137,7 +137,7 @@ std::string AsmFile::ReadPath()
FATAL_INPUT_ERROR("path is too long");
}
- return std::string(m_buffer, startPos, length);
+ return std::string(m_buffer + startPos, length);
}
void AsmFile::SkipEndOfLineComment()