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
19bd7f7b
Commit
19bd7f7b
authored
Mar 13, 2012
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RealRTSP: Fix Heap Overflows
SA-1202
parent
3a57afee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
modules/access/rtsp/real.c
modules/access/rtsp/real.c
+4
-3
No files found.
modules/access/rtsp/real.c
View file @
19bd7f7b
...
...
@@ -351,6 +351,7 @@ static void real_calc_response_and_checksum (char *response, char *chksum, char
chksum
[
i
]
=
response
[
i
*
4
];
}
#define MLTI_BUF_MAX_SIZE 2048
/*
* takes a MLTI-Chunk and a rule number got from match_asm_rule,
...
...
@@ -368,7 +369,7 @@ static int select_mlti_data(const char *mlti_chunk, int mlti_size, int selection
||
(
mlti_chunk
[
3
]
!=
'I'
))
{
lprintf
(
"MLTI tag not detected, copying data
\n
"
);
memcpy
(
*
out
,
mlti_chunk
,
mlti_size
);
memcpy
(
*
out
,
mlti_chunk
,
__MIN
(
mlti_size
,
MLTI_BUF_MAX_SIZE
)
);
return
mlti_size
;
}
...
...
@@ -405,7 +406,7 @@ static int select_mlti_data(const char *mlti_chunk, int mlti_size, int selection
}
size
=
BE_32
(
mlti_chunk
);
memcpy
(
*
out
,
mlti_chunk
+
4
,
size
);
memcpy
(
*
out
,
mlti_chunk
+
4
,
__MIN
(
size
,
MLTI_BUF_MAX_SIZE
)
);
return
size
;
}
...
...
@@ -430,7 +431,7 @@ static rmff_header_t *real_parse_sdp(char *data, char **stream_rules, uint32_t b
desc
=
sdpplin_parse
(
data
);
if
(
!
desc
)
return
NULL
;
buf
=
(
char
*
)
malloc
(
2048
);
buf
=
(
char
*
)
malloc
(
MLTI_BUF_MAX_SIZE
);
if
(
!
buf
)
goto
error
;
header
=
calloc
(
1
,
sizeof
(
rmff_header_t
)
);
...
...
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