Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004796OCamlOCaml generalpublic2009-05-19 21:302009-05-20 13:57
Reporteravsm 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.11.0 
Target VersionFixed in Version3.11.1+dev 
Summary0004796: yacc reader.c substring doesnt null terminate
DescriptionWe've had this patch in the OpenBSD port for a couple of years, and it's triggered with debug malloc flags which fill allocated memory with junk.

patch:
http://www.openbsd.org/cgi-bin/cvsweb/ports/lang/ocaml/patches/patch-yacc_reader_c?rev=1.2 [^]

--- yacc/reader.c.orig Thu Oct 6 07:34:51 2005
+++ yacc/reader.c Thu Nov 27 22:42:14 2008
@@ -163,6 +163,7 @@ char *substring (char *str, int start, int len)
   for (i = 0; i < len; i++){
     buf[i] = str[start+i];
   }
+ buf[i] = '\0';
   return buf;
 }
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0004963)
doligez (administrator)
2009-05-20 13:57

Thanks for the report. Your patch will be included in 3.11.1


- Issue History
Date Modified Username Field Change
2009-05-19 21:30 avsm New Issue
2009-05-20 13:57 doligez Note Added: 0004963
2009-05-20 13:57 doligez Status new => closed
2009-05-20 13:57 doligez Resolution open => fixed
2009-05-20 13:57 doligez Fixed in Version => 3.11.1+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker