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
This commit is contained in:
William S Fulton 2006-10-08 21:55:42 +00:00
commit eb415e97db

View file

@ -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);