Fix for buffer overflow when using large %feature(docstring) reported by Joseph Winston
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9155 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
1edd44f2d9
commit
da0b5cf884
1 changed files with 2 additions and 2 deletions
|
|
@ -4014,12 +4014,12 @@ cpp_destructor_decl : NOT idtemplate LPAREN parms RPAREN cpp_end {
|
|||
|
||||
| VIRTUAL NOT idtemplate LPAREN parms RPAREN cpp_vend {
|
||||
String *name;
|
||||
char *c;
|
||||
char *c = 0;
|
||||
$$ = new_node("destructor");
|
||||
/* Check for template names. If the class is a template
|
||||
and the constructor is missing the template part, we
|
||||
add it */
|
||||
if ((c = strstr(Char(Classprefix),"<"))) {
|
||||
if (Classprefix && (c = strstr(Char(Classprefix),"<"))) {
|
||||
if (!Strstr($3,"<")) {
|
||||
$3 = NewStringf("%s%s",$3,c);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue