We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 720be4b commit 59c7dd2Copy full SHA for 59c7dd2
src/data.cpp
@@ -30,7 +30,7 @@ static bool varint(CTX &ctx, T &val)
30
unsigned int shift = 0;
31
val = 0;
32
33
- while (ctx.bp < ctx.be) {
+ while ((ctx.bp < ctx.be) && (shift < sizeof(T) * 7)) {
34
val |= static_cast<T>((quint8)*ctx.bp & 0x7F) << shift;
35
shift += 7;
36
if (!((quint8)*ctx.bp++ & 0x80))
0 commit comments