Commit 5a2526244749f109f34665e25662cebb66905b35
1 parent
cdf907c4
added br_iterate_utemplates diagnostic
Showing
1 changed file
with
2 additions
and
0 deletions
openbr/universal_template.cpp
| ... | ... | @@ -46,6 +46,8 @@ void br_iterate_utemplates(br_const_utemplate begin, br_const_utemplate end, br_ |
| 46 | 46 | while (begin != end) { |
| 47 | 47 | callback(begin, context); |
| 48 | 48 | begin = reinterpret_cast<br_const_utemplate>(reinterpret_cast<const char*>(begin) + sizeof(br_universal_template) + begin->size); |
| 49 | + if (begin > end) | |
| 50 | + qFatal("Overshot end of buffer"); | |
| 49 | 51 | } |
| 50 | 52 | } |
| 51 | 53 | ... | ... |