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

Alexandre Julliard julliard at winehq.org
Mon Oct 8 13:39:55 CDT 2012


Module: wine
Branch: master
Commit: da0f33370a35fcadf743e2f56cdf7f71bd2e24db
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=da0f33370a35fcadf743e2f56cdf7f71bd2e24db

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Oct  5 12:05:26 2012 +0200

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

---

 tools/widl/utils.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/widl/utils.c b/tools/widl/utils.c
index dc77ae8..9066887 100644
--- a/tools/widl/utils.c
+++ b/tools/widl/utils.c
@@ -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))
 	{




More information about the wine-cvs mailing list