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
8f5bcad3
Commit
8f5bcad3
authored
Nov 14, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert crappy revert [17764] and fix off-by-one error as in trunk.
There is still a lot of fixes to be backported here.
parent
77887049
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
modules/services_discovery/sap.c
modules/services_discovery/sap.c
+5
-4
No files found.
modules/services_discovery/sap.c
View file @
8f5bcad3
...
...
@@ -631,6 +631,7 @@ static int ParseSAP( services_discovery_t *p_sd, uint8_t *p_buffer, int i_read )
{
int
i_version
,
i_address_type
,
i_hash
,
i
;
char
*
psz_sdp
,
*
psz_foo
,
*
psz_initial_sdp
;
uint8_t
*
p_decompressed_buffer
=
NULL
;
sdp_t
*
p_sdp
;
vlc_bool_t
b_compressed
;
vlc_bool_t
b_need_delete
=
VLC_FALSE
;
...
...
@@ -698,15 +699,14 @@ static int ParseSAP( services_discovery_t *p_sd, uint8_t *p_buffer, int i_read )
{
#ifdef HAVE_ZLIB_H
int
i_decompressed_size
;
uint8_t
*
p_decompressed_buffer
=
NULL
;
i_decompressed_size
=
Decompress
(
(
uint8_t
*
)
psz_sdp
,
&
p_decompressed_buffer
,
i_read
-
(
psz_sdp
-
(
char
*
)
p_buffer
)
);
if
(
i_decompressed_size
>
0
&&
i_decompressed_size
<
MAX_SAP_BUFFER
)
if
(
i_decompressed_size
>
0
)
{
memcpy
(
psz_sdp
,
p_decompressed_buffer
,
i_decompressed_size
);
psz_sdp
=
(
char
*
)
p_decompressed_buffer
;
realloc
(
p_decompressed_buffer
,
i_decompressed_size
+
1
);
psz_sdp
[
i_decompressed_size
]
=
'\0'
;
free
(
p_decompressed_buffer
);
}
else
{
...
...
@@ -806,6 +806,7 @@ static int ParseSAP( services_discovery_t *p_sd, uint8_t *p_buffer, int i_read )
CreateAnnounce
(
p_sd
,
i_hash
,
p_sdp
);
FREE
(
p_decompressed_buffer
);
return
VLC_SUCCESS
;
}
...
...
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