Fix buffer overflows in eve.c (sf.net #3034056)
[monky] / src / text_object.c
index 3b0fb42..7bc625b 100644 (file)
@@ -9,7 +9,7 @@
  *
  * Please see COPYING for details
  *
- * Copyright (c) 2005-2009 Brenden Matthews, Philip Kovacs, et. al.
+ * Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al.
  *     (see AUTHORS)
  * All rights reserved.
  *
@@ -107,7 +107,7 @@ static int push_ifblock(struct ifblock_stack_obj **ifblock_stack_top,
                case IFBLOCK_ENDIF:
                        if (!(*ifblock_stack_top))
                                CRIT_ERR(NULL, NULL, "got an endif without matching if");
-                       (*ifblock_stack_top)->obj->special_data = obj;
+                       (*ifblock_stack_top)->obj->ifblock_next = obj;
                        /* if there's some else in between, remove and free it */
                        if ((*ifblock_stack_top)->type == IFBLOCK_ELSE) {
                                stackobj = *ifblock_stack_top;
@@ -122,7 +122,7 @@ static int push_ifblock(struct ifblock_stack_obj **ifblock_stack_top,
                case IFBLOCK_ELSE:
                        if (!(*ifblock_stack_top))
                                CRIT_ERR(NULL, NULL, "got an else without matching if");
-                       (*ifblock_stack_top)->obj->special_data = obj;
+                       (*ifblock_stack_top)->obj->ifblock_next = obj;
                        /* fall through */
                case IFBLOCK_IF:
                        stackobj = malloc(sizeof(struct ifblock_stack_obj));