widl: Alloc big enough buffer in dup_basename to handle registration suffix.
This commit is contained in:
parent
61f894c576
commit
da0f33370a
|
@ -159,8 +159,8 @@ char *dup_basename(const char *name, const char *ext)
|
||||||
|
|
||||||
namelen = strlen(name);
|
namelen = strlen(name);
|
||||||
|
|
||||||
/* +4 for later extension and +1 for '\0' */
|
/* +6 for later extension (strlen("_r.rgs")) and +1 for '\0' */
|
||||||
base = xmalloc(namelen +4 +1);
|
base = xmalloc(namelen +6 +1);
|
||||||
strcpy(base, name);
|
strcpy(base, name);
|
||||||
if(!strcasecmp(name + namelen-extlen, ext))
|
if(!strcasecmp(name + namelen-extlen, ext))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue