Skip to content

Commit 64873b4

Browse files
starseekercshorler
authored andcommitted
Use strncat to copy name to buf
1 parent 28c5d26 commit 64873b4

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/exp2cxx/classes_type.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ const char * EnumCElementName( Type type, Expression expr ) {
104104
static char buf [BUFSIZ+1];
105105
sprintf( buf, "%s__",
106106
EnumName( TYPEget_name( type ) ) );
107-
strcat( buf, StrToLower( EXPget_name( expr ) ) );
108-
107+
strncat( buf, StrToLower( EXPget_name( expr ) ), BUFSIZ );
109108
return buf;
110109
}
111110

0 commit comments

Comments
 (0)