From eb415e97db77801682aef3f6b48b90edef223134 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sun, 8 Oct 2006 21:55:42 +0000 Subject: [PATCH] Fix buffer overrun reported by M Edward Borasky git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9426 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/Modules/overload.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SWIG/Source/Modules/overload.cxx b/SWIG/Source/Modules/overload.cxx index 26f0c6a7d..ae83c1674 100644 --- a/SWIG/Source/Modules/overload.cxx +++ b/SWIG/Source/Modules/overload.cxx @@ -13,7 +13,7 @@ char cvsroot_overload_cxx[] = "$Header$"; #include "swigmod.h" -#define MAX_OVERLOAD 256 +#define MAX_OVERLOAD 4096 /* Overload "argc" and "argv" */ String *argv_template_string; @@ -78,6 +78,7 @@ Swig_overload_rank(Node *n, bool script_lang_wrapping) { /* Make a list of all the declarations (methods) that are overloaded with * this one particular method name */ if (Getattr(c,"wrap:name")) { + assert(nnodes < MAX_OVERLOAD); nodes[nnodes].n = c; nodes[nnodes].parms = Getattr(c,"wrap:parms"); nodes[nnodes].argc = emit_num_required(nodes[nnodes].parms);