From 946bde4a62fa9c4c47315defb2e31cf54d821246 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 26 Jan 2011 22:23:30 +0000 Subject: Patch a few buffer overrun problems and odd crash potentials git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1217371 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdecore/kurl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kdecore/kurl.cpp') diff --git a/kdecore/kurl.cpp b/kdecore/kurl.cpp index 047f18dee..428ab2f20 100644 --- a/kdecore/kurl.cpp +++ b/kdecore/kurl.cpp @@ -83,7 +83,7 @@ static TQString encode( const TQString& segment, int encoding_offset, int encodi int old_length = isRawURI ? local.size() - 1 : local.length(); - if ( !old_length ) + if ( old_length < 1 ) return segment.isNull() ? TQString::null : TQString(""); // differentiate null and empty // a worst case approximation -- cgit v1.2.3