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:
parent
a3efb5c4f7
commit
eb415e97db
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue