aboutsummaryrefslogtreecommitdiff
path: root/src/reflist.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-05-05 08:36:15 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:25 +0100
commit512283b33951ad728a44f0706dec4cfa64786f88 (patch)
treec073512bb79a1ada20587332d7415168851e0da5 /src/reflist.c
parent68f64bd227168844306ae3bb983b6cb7a224251f (diff)
Check that indices are not out of range
Diffstat (limited to 'src/reflist.c')
-rw-r--r--src/reflist.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/reflist.c b/src/reflist.c
index d23b952c..d6773a09 100644
--- a/src/reflist.c
+++ b/src/reflist.c
@@ -577,6 +577,10 @@ Reflection *add_refl(RefList *list, signed int h, signed int k, signed int l)
{
Reflection *new;
+ assert(abs(h)<256);
+ assert(abs(k)<256);
+ assert(abs(l)<256);
+
new = new_node(SERIAL(h, k, l));
if ( list->head == NULL ) {