﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
56	emxomfld doesn't properly allocate space for map file name	Yuri Dario	bird	"When the output file name doesn't include the extension (this is not required for omf linkers), the map file name space allocation is shorter than needed, so a memory overwriting occurs.


{{{
Index: emxomfld.c
===================================================================
--- emxomfld.c	(revision 2508)
+++ emxomfld.c	(working copy)
@@ -1657,8 +1670,13 @@
     map_fname = ""nul"";
   else if (map_fname == NULL)
     {
-      t = xstrdup (output_fname);
+      //yd output file name can be without extension, need to alloc enough space
+      t = xmalloc (strlen (output_fname) + 1 + 4);
+      strcpy (t, output_fname);
       _remext (t);

}}}
"	defect	closed	normal	libc-0.6.1	emx	0.6	normal	invalid		
