summaryrefslogtreecommitdiffstats
path: root/redhat/kdepim/kdepim-3.5.13.1-fix_imapparser_segv_2.patch
blob: d8260c1663c1aa833b9e2c40193f6d97fdae488c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- kdepim-3.5.13.1/kioslaves/imap4/imapparser.h~	2012-09-26 14:43:52.932265697 +0200
+++ kdepim-3.5.13.1/kioslaves/imap4/imapparser.h	2012-09-26 14:45:33.190317168 +0200
@@ -94,7 +94,11 @@
   }
   uint length()
   {
-    return data.size() - pos;
+    if( pos < data.size() ) {
+      return data.size() - pos;
+    } else {
+      return 0;
+    }
   }
   void fromString(const TQString &s)
   {