[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdecore/sonnet
From: Zack Rusin <zack () kde ! org>
Date: 2009-11-30 17:27:04
Message-ID: 1259602024.195007.8129.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1056722 by zack:
sonnet: fix out of bounds accesses
fixes an assert in skipping links at the end of buffers
M +5 -1 filter.cpp
--- trunk/KDE/kdelibs/kdecore/sonnet/filter.cpp #1056721:1056722
@@ -236,9 +236,13 @@
bool Filter::trySkipLinks() const
{
- QChar currentChar = m_buffer.at( m_finder.position() );
+ QChar currentChar;
int currentPosition = m_finder.position();
+ if (currentPosition < 0 || currentPosition >= m_buffer.length())
+ return false;
+ currentChar = m_buffer.at( currentPosition );
+
int length = m_buffer.length();
//URL - if so skip
if ( currentChar == ':'
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic