Fix an off-by-one error that results in duplicate row fetching and thus
a memory leak, per bug #733413.
diff -Naur libdbi-0.8.3.orig/src/dbi_result.c libdbi-0.8.3/src/dbi_result.c
--- libdbi-0.8.3.orig/src/dbi_result.c 2008-01-23 11:37:36.000000000 -0500
+++ libdbi-0.8.3/src/dbi_result.c 2011-09-06 20:51:34.610449576 -0400
@@ -1533,7 +1533,7 @@
}
static int _is_row_fetched(dbi_result_t *result, unsigned long long row) {
- if (!result->rows || (row >= result->numrows_matched)) return -1;
+ if (!result->rows || (row > result->numrows_matched)) return -1;
return !(result->rows[row] == NULL);
}