Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
b3cb03fe
Commit
b3cb03fe
authored
May 10, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't override original pointer when realloc fails.
parent
261fd89d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
modules/access/rtmp/rtmp_amf_flv.c
modules/access/rtmp/rtmp_amf_flv.c
+12
-4
No files found.
modules/access/rtmp/rtmp_amf_flv.c
View file @
b3cb03fe
...
@@ -2071,8 +2071,12 @@ rtmp_body_append( rtmp_body_t *rtmp_body, uint8_t *buffer, uint32_t length )
...
@@ -2071,8 +2071,12 @@ rtmp_body_append( rtmp_body_t *rtmp_body, uint8_t *buffer, uint32_t length )
{
{
if
(
rtmp_body
->
length_body
+
length
>
rtmp_body
->
length_buffer
)
if
(
rtmp_body
->
length_body
+
length
>
rtmp_body
->
length_buffer
)
{
{
uint8_t
*
tmp
;
rtmp_body
->
length_buffer
=
rtmp_body
->
length_body
+
length
;
rtmp_body
->
length_buffer
=
rtmp_body
->
length_body
+
length
;
rtmp_body
->
body
=
(
uint8_t
*
)
realloc
(
rtmp_body
->
body
,
rtmp_body
->
length_buffer
*
sizeof
(
uint8_t
)
);
tmp
=
realloc
(
rtmp_body
->
body
,
rtmp_body
->
length_buffer
*
sizeof
(
uint8_t
)
);
if
(
!
tmp
)
return
;
rtmp_body
->
body
=
tmp
;
}
}
memcpy
(
rtmp_body
->
body
+
rtmp_body
->
length_body
,
buffer
,
length
);
memcpy
(
rtmp_body
->
body
+
rtmp_body
->
length_body
,
buffer
,
length
);
...
@@ -2320,11 +2324,15 @@ static void
...
@@ -2320,11 +2324,15 @@ static void
flv_rebuild
(
rtmp_control_thread_t
*
p_thread
,
rtmp_packet_t
*
rtmp_packet
)
flv_rebuild
(
rtmp_control_thread_t
*
p_thread
,
rtmp_packet_t
*
rtmp_packet
)
{
{
uint32_t
length_tag
,
timestamp
;
uint32_t
length_tag
,
timestamp
;
uint8_t
*
tmp
;
rtmp_packet
->
body
->
body
=
(
uint8_t
*
)
realloc
(
rtmp_packet
->
body
->
body
,
tmp
=
(
uint8_t
*
)
realloc
(
rtmp_packet
->
body
->
body
,
rtmp_packet
->
body
->
length_body
+
FLV_TAG_PREVIOUS_TAG_SIZE
+
FLV_TAG_SIZE
);
rtmp_packet
->
body
->
length_body
+
FLV_TAG_PREVIOUS_TAG_SIZE
+
FLV_TAG_SIZE
);
if
(
!
tmp
)
return
;
rtmp_packet
->
body
->
body
=
tmp
;
memmove
(
rtmp_packet
->
body
->
body
+
FLV_TAG_PREVIOUS_TAG_SIZE
+
FLV_TAG_SIZE
,
memmove
(
rtmp_packet
->
body
->
body
+
FLV_TAG_PREVIOUS_TAG_SIZE
+
FLV_TAG_SIZE
,
rtmp_packet
->
body
->
body
,
rtmp_packet
->
body
->
length_body
);
rtmp_packet
->
body
->
body
,
rtmp_packet
->
body
->
length_body
);
/* Insert tag */
/* Insert tag */
p_thread
->
flv_tag_previous_tag_size
=
hton32
(
p_thread
->
flv_tag_previous_tag_size
);
p_thread
->
flv_tag_previous_tag_size
=
hton32
(
p_thread
->
flv_tag_previous_tag_size
);
...
...
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