diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-02-23 09:11:57 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-02-23 09:11:57 +0100 |
commit | d56f3fcfdb6e166118d869290723320891c5c878 (patch) | |
tree | a013d36815a67040a48573f022db9bc255ce02a0 /src/init1.cc | |
parent | 77555000118402f6fdb86d2cd116781d0d7bd795 (diff) |
init1.c: Add missing range check for a_info[] load
Diffstat (limited to 'src/init1.cc')
-rw-r--r-- | src/init1.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/init1.cc b/src/init1.cc index a65863b5..770ae4d0 100644 --- a/src/init1.cc +++ b/src/init1.cc @@ -5112,6 +5112,9 @@ errr init_a_info_txt(FILE *fp, char *buf) /* Verify information */ if (i < error_idx) return (4); + /* Verify information */ + if (i >= max_a_idx) return (2); + /* Save the index */ error_idx = i; |