0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-03-14 00:48:42 +00:00
termux-packages/packages/openscad/CVE-2022-0497.patch
Tee KOBAYASHI b50674ec4a openscad: Add patches for CVEs
CVE-2020-28599, CVE-2022-0496 and CVE-2022-0497.
2022-11-19 22:34:16 +00:00

14 lines
413 B
Diff

https://github.com/openscad/openscad/commit/78a82cf31767bda6969d8ea2eb851dc24c12b4b0
--- a/src/comment.cc
+++ b/src/comment.cpp
@@ -92,7 +92,7 @@ static std::string getComment(const std::string &fulltext, int line)
}
int end = start + 1;
- while (fulltext[end] != '\n') end++;
+ while (end < fulltext.size() && fulltext[end] != '\n') end++;
std::string comment = fulltext.substr(start, end - start);