Bug fix submitted by Taylor Campbell:
Since `s48_extract_unsigned_integer' may cause a garbage collection, because it calls back to Scheme, the extraction of the host and port in the internet address case must be GC-protected, around line 110. A patch to fix this is attached.
This commit is contained in:
parent
3ee7a21884
commit
71a747b4f2
|
@ -107,9 +107,14 @@ s48_value scheme_connect(s48_value sock, s48_value family, s48_value scheme_name
|
|||
{
|
||||
struct sockaddr_in name;
|
||||
|
||||
S48_DECLARE_GC_PROTECT (1);
|
||||
S48_GC_PROTECT_1 (scheme_name);
|
||||
|
||||
u_long addr= htonl(s48_extract_unsigned_integer (S48_CAR (scheme_name)));
|
||||
u_short port= htons(s48_extract_fixnum (S48_CDR (scheme_name)));
|
||||
|
||||
S48_GC_UNPROTECT ();
|
||||
|
||||
memset(&name, 0, sizeof(name));
|
||||
|
||||
name.sin_family=AF_INET;
|
||||
|
|
Loading…
Reference in New Issue