[Kst] extragear/graphics/kst/kst

Andrew Walker arwalker at sumusltd.com
Wed Nov 16 00:36:58 CET 2005


SVN commit 480664 by arwalker:

Make the array large enough so that we don't write beyond the end of it.

 M  +2 -1      ktimezonecombo.cpp  


--- trunk/extragear/graphics/kst/kst/ktimezonecombo.cpp #480663:480664
@@ -41,10 +41,11 @@
 
   insertItem("UTC");
   const KstTimezones::ZoneMap zones = db->allZones();
-  d->_offsets.resize(zones.count());
+  d->_offsets.resize(zones.count()+1);
   d->_offsets[0] = 0;
   d->_names += "UTC";
   int i = 0;
+  
   for (KstTimezones::ZoneMap::ConstIterator it = zones.begin(); it != zones.end(); ++it) {
     int offset = (*it)->offset();
     d->_offsets[++i] = offset;


More information about the Kst mailing list