widl: Alloc big enough buffer in dup_basename to handle registration suffix.

This commit is contained in:
Jacek Caban 2012-10-05 12:05:26 +02:00 committed by Alexandre Julliard
parent 61f894c576
commit da0f33370a
1 changed files with 2 additions and 2 deletions

View File

@ -159,8 +159,8 @@ char *dup_basename(const char *name, const char *ext)
namelen = strlen(name);
/* +4 for later extension and +1 for '\0' */
base = xmalloc(namelen +4 +1);
/* +6 for later extension (strlen("_r.rgs")) and +1 for '\0' */
base = xmalloc(namelen +6 +1);
strcpy(base, name);
if(!strcasecmp(name + namelen-extlen, ext))
{