Opened 18 years ago

Closed 18 years ago

#36 closed defect (fixed)

emxbind: export truncation bug and allow export & imports up to 255 chars

Reported by: Yuri Dario Owned by: bird
Priority: normal Milestone: libc-0.6.1
Component: emx Version: 0.6
Severity: normal Keywords: emxbind
Cc:

Description

Symbols longer than 127 bytes are truncated, code removed appear bad written code.

Index: src/emxbind/export.c
===================================================================
--- src/emxbind/export.c	(revision 2508)
+++ src/emxbind/export.c	(working copy)
@@ -75,10 +79,7 @@
   word ord16;
 
   name_len = strlen (name);
-  if (name_len >= 128)
-    name_len = 127;
-  else
-    blen = (byte)name_len;
+  blen = (byte)name_len;
   ord16 = (word)ord;
   put_grow (table, &blen, 1);
   put_grow (table, name, name_len);
Index: src/emxbind/fixup.c
===================================================================
--- src/emxbind/fixup.c	(revision 2508)
+++ src/emxbind/fixup.c	(working copy)
@@ -284,8 +284,6 @@
   byte blen;
 
   name_len = strlen (name);
-  if (name_len >= 128)
-    name_len = 127;
   i = 0;
   while (i < procs.len)
     {

Change History (2)

comment:1 Changed 18 years ago by Yuri Dario

Milestone: libc-0.6.1

comment:2 Changed 18 years ago by bird

Keywords: emxbind added
Resolution: fixed
Status: newclosed
Summary: emxbind doesn't allow symbols longer than 127 charsemxbind: export truncation bug and allow export & imports up to 255 chars
Version: 0.6

The export.c patch is quite obviously wrong. I've changed it to emit a warning when truncating, and to truncate to 255 instead of (name_len & 0xff). The fixup.c patch has been applied unmodified.

Note: See TracTickets for help on using tickets.