Skip to content

Commit

Permalink
Added a check for value out of bounds in QgsOgrProvider
Browse files Browse the repository at this point in the history
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 e023e84
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -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)
{
Expand Down

0 comments on commit e023e84

Please sign in to comment.