Thanks! I'll push a repair.

At Fri, 27 Feb 2015 03:12:38 -0800 (PST), Sergey Pinaev wrote:
> hi.
> sch_unix_putenv does:
> 
> oldbuffer = (char *)putenv_str_table_get(var);
> if (oldbuffer)
>       free(oldbuffer);
> putenv_str_table_put_name(var, buffer);
> putenv(buffer);
> 
> this is wrong. free(oldbuffer) should be called AFTER putenv(buffer), 
> because
> putenv_str_table_put_name() can call malloc and get memory used by oldbuffer
> and overwrite its content. but environment, modified by putenv, is list of 
> pointers
> to strings (in "key=value" form) and it contains pointer to oldbuffer.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-dev/f76d8cee-0a8c-4a1f-93c7-085bbb6cea
> 63%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-dev/20150227150046.5E6A86501BF%40mail-svr1.cs.utah.edu.
For more options, visit https://groups.google.com/d/optout.

Reply via email to