From p.dalgaard@biostat.ku.dk  Wed Oct 13 16:05:10 1999
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 13 Oct 1999 17:05:10 +0200
Subject: [R] main/character.c (et.al): dangerous AllocBuffer()
In-Reply-To: Thomas Hoffmann's message of "Wed, 13 Oct 1999 15:21:11 +0200 (METDST)"
References: <199910131321.PAA06250@ehmgs2.et.tu-dresden.de>
Message-ID: <x2vh8b8fo9.fsf@blueberry.kubism.ku.dk>

Thomas Hoffmann <hoffmann@ehmgs2.et.tu-dresden.de> writes:

> When called with len<0 the code is assumed to re-size buff to MAXELTSIZE:
> 
> 	realloc(buff, 0);
> 	buff = (char *) realloc(buff, MAXELTSIZE);
> 	bufsize = MAXELTSIZE;
--etc--

Fixed as suggested (free+malloc)

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[R] main/character.c (et.al): dangerous AllocBuffer()
Peter Dalgaard BSA