Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
a30cdd82
Commit
a30cdd82
authored
Jun 27, 2005
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/misc/httpd.c: fixed a crash in IPv4 handling, patch from Maxime Bizon.
parent
4f0d5691
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
src/misc/httpd.c
src/misc/httpd.c
+9
-10
No files found.
src/misc/httpd.c
View file @
a30cdd82
...
@@ -1334,27 +1334,26 @@ void httpd_ClientModeBidir( httpd_client_t *cl )
...
@@ -1334,27 +1334,26 @@ void httpd_ClientModeBidir( httpd_client_t *cl )
char
*
httpd_ClientIP
(
httpd_client_t
*
cl
)
char
*
httpd_ClientIP
(
httpd_client_t
*
cl
)
{
{
int
i
;
int
i
;
char
*
psz_ip
;
char
sz_ip
[
NI_MAXNUMERICHOST
+
2
]
;
psz_ip
=
(
char
*
)
malloc
(
NI_MAXNUMERICHOST
+
2
);
i
=
vlc_getnameinfo
(
(
const
struct
sockaddr
*
)
&
cl
->
sock
,
cl
->
i_sock_size
,
i
=
vlc_getnameinfo
(
(
const
struct
sockaddr
*
)
&
cl
->
sock
,
cl
->
i_sock_size
,
p
sz_ip
+
1
,
NI_MAXNUMERICHOST
,
NULL
,
NI_NUMERICHOST
);
sz_ip
+
1
,
NI_MAXNUMERICHOST
,
NULL
,
NI_NUMERICHOST
);
if
(
i
!=
0
)
if
(
i
!=
0
)
return
NULL
;
return
NULL
;
/* semi-colon in address => must add bracket for HTTP */
/* semi-colon in address => must add bracket for HTTP */
if
(
strchr
(
p
sz_ip
+
1
,
':'
)
!=
NULL
)
if
(
strchr
(
sz_ip
+
1
,
':'
)
!=
NULL
)
{
{
p
sz_ip
[
0
]
=
'['
;
sz_ip
[
0
]
=
'['
;
i
=
strlen
(
p
sz_ip
);
i
=
strlen
(
sz_ip
);
p
sz_ip
[
i
++
]
=
']'
;
sz_ip
[
i
++
]
=
']'
;
p
sz_ip
[
i
]
=
'\0'
;
sz_ip
[
i
]
=
'\0'
;
return
psz_ip
;
return
strdup
(
sz_ip
)
;
}
}
return
psz_ip
+
1
;
return
strdup
(
sz_ip
+
1
)
;
}
}
static
void
httpd_ClientClean
(
httpd_client_t
*
cl
)
static
void
httpd_ClientClean
(
httpd_client_t
*
cl
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment