src/common.c: More reliable error reporting in `parse_values'.
authorFlorian Forster <octo@noris.net>
Wed, 1 Jul 2009 12:56:17 +0000 (14:56 +0200)
committerFlorian Forster <octo@noris.net>
Wed, 1 Jul 2009 12:56:17 +0000 (14:56 +0200)
src/common.c

index 1af2f14..95c3dce 100644 (file)
@@ -805,7 +805,11 @@ int parse_values (char *buffer, value_list_t *vl, const data_set_t *ds)
                dummy = NULL;
 
                if (i >= vl->values_len)
+               {
+                       /* Make sure i is invalid. */
+                       i = vl->values_len + 1;
                        break;
+               }
 
                if (i == -1)
                {