diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-11-06 20:53:13 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-11-07 01:34:34 +0100 |
commit | 5effaa90f38d55f035d381ad8982d2ed6b9d46de (patch) | |
tree | d34e74ef7269690149971ee99de011225a525214 /idl/inc | |
parent | 614e04019a672cdd61b86699d99250d80f169f95 (diff) |
idl: fix out of bounds string accesses
Change-Id: Id0d07ff9bcd4858cb74458eaf13fb9386387f455
Diffstat (limited to 'idl/inc')
-rw-r--r-- | idl/inc/lex.hxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx index 238f5b904d20..2f816358bca8 100644 --- a/idl/inc/lex.hxx +++ b/idl/inc/lex.hxx @@ -140,7 +140,9 @@ class SvTokenStream int GetNextChar(); int GetFastNextChar() { - return aBufStr[nBufPos++]; + return (nBufPos < aBufStr.getLength()) + ? aBufStr[nBufPos++] + : '\0'; } void FillTokenList(); |