Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
c455254f
Commit
c455254f
authored
16 years ago
by
Yang Tse
Browse files
Options
Downloads
Patches
Plain Diff
attempt to fix or allow further detection of an elusive icc SIGSEGV
parent
bb1f6e68
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/hostares.c
+26
-17
26 additions, 17 deletions
lib/hostares.c
lib/hostip.c
+29
-17
29 additions, 17 deletions
lib/hostip.c
with
55 additions
and
34 deletions
lib/hostares.c
+
26
−
17
View file @
c455254f
...
...
@@ -292,10 +292,9 @@ CURLcode Curl_wait_for_resolv(struct connectdata *conn,
#ifdef ENABLE_IPV6
/* CURLRES_IPV6 */
struct
namebuf6
{
struct
hostent
hostentry
;
char
*
h_addr_list
[
2
];
struct
hostent
hostentry
;
struct
in6_addr
addrentry
;
char
hostname
[
1
];
char
*
h_addr_list
[
2
];
};
/*
...
...
@@ -312,41 +311,51 @@ Curl_addrinfo *Curl_ip2addr6(struct in6_addr *in,
{
Curl_addrinfo
*
ai
;
#if defined(VMS) &&
defined(__INITIAL_POINTER_SIZE) &&
\
(__INITIAL_POINTER_SIZE == 64)
#if defined(VMS) && \
defined(__INITIAL_POINTER_SIZE) &&
(__INITIAL_POINTER_SIZE == 64)
#pragma pointer_size save
#pragma pointer_size short
#pragma message disable PTRMISMATCH
#endif
struct
hostent
*
h
;
struct
hostent
*
h
;
struct
in6_addr
*
addrentry
;
struct
namebuf6
*
buf
=
malloc
(
sizeof
(
struct
namebuf6
)
+
strlen
(
hostname
));
struct
namebuf6
*
buf
;
char
*
hoststr
;
DEBUGASSERT
(
in
&&
hostname
);
buf
=
malloc
(
sizeof
(
struct
namebuf6
));
if
(
!
buf
)
return
NULL
;
hoststr
=
strdup
(
hostname
);
if
(
!
hoststr
)
{
free
(
buf
);
return
NULL
;
}
addrentry
=
&
buf
->
addrentry
;
memcpy
(
addrentry
,
in
,
sizeof
(
struct
in6_addr
));
h
=
&
buf
->
hostentry
;
h
->
h_name
=
hoststr
;
h
->
h_aliases
=
NULL
;
h
->
h_addrtype
=
AF_INET6
;
h
->
h_length
=
sizeof
(
struct
in6_addr
);
h
->
h_addr_list
=
&
buf
->
h_addr_list
[
0
];
addrentry
=
&
buf
->
addrentry
;
memcpy
(
addrentry
,
in
,
sizeof
(
*
in
));
h
->
h_addr_list
[
0
]
=
(
char
*
)
addrentry
;
h
->
h_addr_list
[
1
]
=
NULL
;
/* terminate list of entries */
h
->
h_name
=
&
buf
->
hostname
[
0
];
h
->
h_aliases
=
NULL
;
h
->
h_addrtype
=
AF_INET6
;
/* Now store the dotted version of the address */
strcpy
(
h
->
h_name
,
hostname
);
#if defined(VMS) &&
defined(__INITIAL_POINTER_SIZE) &&
\
(__INITIAL_POINTER_SIZE == 64)
#if defined(VMS) && \
defined(__INITIAL_POINTER_SIZE) &&
(__INITIAL_POINTER_SIZE == 64)
#pragma pointer_size restore
#pragma message enable PTRMISMATCH
#endif
ai
=
Curl_he2ai
(
h
,
port
);
free
(
hoststr
);
free
(
buf
);
return
ai
;
...
...
This diff is collapsed.
Click to expand it.
lib/hostip.c
+
29
−
17
View file @
c455254f
...
...
@@ -733,11 +733,10 @@ void Curl_freeaddrinfo(Curl_addrinfo *ai)
}
}
struct
namebuf
{
struct
namebuf
4
{
struct
hostent
hostentry
;
char
*
h_addr_list
[
2
];
struct
in_addr
addrentry
;
char
h_
name
[
16
];
/* 123.123.123.123 = 15 letters is maximum */
char
*
h_
addr_list
[
2
];
};
/*
...
...
@@ -760,13 +759,23 @@ Curl_addrinfo *Curl_ip2addr(in_addr_t num, const char *hostname, int port)
#pragma message disable PTRMISMATCH
#endif
struct
hostent
*
h
;
struct
in_addr
*
addrentry
;
struct
namebuf
buffer
;
struct
namebuf
*
buf
=
&
buffer
;
struct
hostent
*
h
;
struct
in_addr
*
addrentry
;
struct
namebuf4
*
buf
;
char
*
hoststr
;
DEBUGASSERT
(
hostname
);
buf
=
malloc
(
sizeof
(
struct
namebuf4
));
if
(
!
buf
)
return
NULL
;
hoststr
=
strdup
(
hostname
);
if
(
!
hoststr
)
{
free
(
buf
);
return
NULL
;
}
h
=
&
buf
->
hostentry
;
h
->
h_addr_list
=
&
buf
->
h_addr_list
[
0
];
addrentry
=
&
buf
->
addrentry
;
#ifdef _CRAYC
/* On UNICOS, s_addr is a bit field and for some reason assigning to it
...
...
@@ -776,15 +785,15 @@ Curl_addrinfo *Curl_ip2addr(in_addr_t num, const char *hostname, int port)
#else
addrentry
->
s_addr
=
num
;
#endif
h
->
h_addr_list
[
0
]
=
(
char
*
)
addrentry
;
h
->
h_addr_list
[
1
]
=
NULL
;
h
->
h_addrtype
=
AF_INET
;
h
->
h_length
=
sizeof
(
*
addrentry
);
h
->
h_name
=
&
buf
->
h_name
[
0
];
h
->
h_aliases
=
NULL
;
/* Now store the dotted version of the address */
snprintf
(
h
->
h_name
,
16
,
"%s"
,
hostname
);
h
=
&
buf
->
hostentry
;
h
->
h_name
=
hoststr
;
h
->
h_aliases
=
NULL
;
h
->
h_addrtype
=
AF_INET
;
h
->
h_length
=
sizeof
(
struct
in_addr
);
h
->
h_addr_list
=
&
buf
->
h_addr_list
[
0
];
h
->
h_addr_list
[
0
]
=
(
char
*
)
addrentry
;
h
->
h_addr_list
[
1
]
=
NULL
;
/* terminate list of entries */
#if defined(VMS) && \
defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64)
...
...
@@ -794,6 +803,9 @@ Curl_addrinfo *Curl_ip2addr(in_addr_t num, const char *hostname, int port)
ai
=
Curl_he2ai
(
h
,
port
);
free
(
hoststr
);
free
(
buf
);
return
ai
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment