diff options
| author | Kim Kulling <kimkulling@users.noreply.github.com> | 2024-01-30 14:32:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-30 14:32:41 +0100 |
| commit | c08e3b4abbc2707bd22096fffeec35325e33aafa (patch) | |
| tree | 1ac741cacf911eea82be9e5ca49d5b752112a370 /code/PostProcessing/ProcessHelper.cpp | |
| parent | d5f35582d4044362be507b83b76ed0b7822c071a (diff) | |
Add bounds checks to the parsing utilities. (#5421)
* Add bounds checks to the parsing utilities.
* Fix merge conflicts in ACLoader.
* Fix loaders
* Fix unittest of AC-Loader.
* Remove dead code.
* Md5Parser fixes
* Fix md5-parsing
* Fix Merge conflict
* Fix merge conflicts.
* Md5: Fix warning: missing return statement.
Diffstat (limited to 'code/PostProcessing/ProcessHelper.cpp')
| -rw-r--r-- | code/PostProcessing/ProcessHelper.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/code/PostProcessing/ProcessHelper.cpp b/code/PostProcessing/ProcessHelper.cpp index e55c17648..36ffd6fe0 100644 --- a/code/PostProcessing/ProcessHelper.cpp +++ b/code/PostProcessing/ProcessHelper.cpp @@ -52,8 +52,9 @@ namespace Assimp { // ------------------------------------------------------------------------------- void ConvertListToStrings(const std::string &in, std::list<std::string> &out) { const char *s = in.c_str(); + const char *end = in.c_str() + in.size(); while (*s) { - SkipSpacesAndLineEnd(&s); + SkipSpacesAndLineEnd(&s, end); if (*s == '\'') { const char *base = ++s; while (*s != '\'') { @@ -66,7 +67,7 @@ void ConvertListToStrings(const std::string &in, std::list<std::string> &out) { out.emplace_back(base, (size_t)(s - base)); ++s; } else { - out.push_back(GetNextToken(s)); + out.push_back(GetNextToken(s, end)); } } } |
