summaryrefslogtreecommitdiff
path: root/innobase/rem/rem0rec.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/rem/rem0rec.c')
-rw-r--r--innobase/rem/rem0rec.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/innobase/rem/rem0rec.c b/innobase/rem/rem0rec.c
index 749e19575bc..3889f62afa2 100644
--- a/innobase/rem/rem0rec.c
+++ b/innobase/rem/rem0rec.c
@@ -105,6 +105,17 @@ rec_get_nth_field(
ut_ad(rec && len);
ut_ad(n < rec_get_n_fields(rec));
+ if (n > 1024) {
+ fprintf(stderr, "Error: trying to access field %lu in rec\n",
+ n);
+ ut_a(0);
+ }
+
+ if (rec == NULL) {
+ fprintf(stderr, "Error: rec is NULL pointer\n");
+ ut_a(0);
+ }
+
if (rec_get_1byte_offs_flag(rec)) {
os = rec_1_get_field_start_offs(rec, n);