Skip to content
Permalink
Browse files
Added a check for value out of bounds in QgsOgrProvider
git-svn-id: http://svn.osgeo.org/qgis/trunk@5658 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Aug 2, 2006
1 parent 58e7844 commit e023e84f6510a32a1b2a86a617cadaeff38738d0
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/providers/ogr/qgsogrprovider.cpp
@@ -833,11 +833,12 @@ QString QgsOgrProvider::minValue(int position)

QString QgsOgrProvider::maxValue(int position)
{
if(position>=fieldCount())
if(position>=fieldCount() || position < 0)
{
#ifdef QGISDEBUG
QgsLogger::warning("Warning: access requested to invalid position in QgsOgrProvider::maxValue(..)");
#endif
#endif
return "";
}
if(minmaxcachedirty)
{

0 comments on commit e023e84

Please sign in to comment.