Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
bc3af7e7
Commit
bc3af7e7
authored
Jun 15, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SRTP: check buffer length before sequence
parent
74e39ff5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
libs/srtp/srtp.c
libs/srtp/srtp.c
+8
-4
No files found.
libs/srtp/srtp.c
View file @
bc3af7e7
...
@@ -600,17 +600,21 @@ int
...
@@ -600,17 +600,21 @@ int
srtp_send
(
srtp_session_t
*
s
,
uint8_t
*
buf
,
size_t
*
lenp
,
size_t
bufsize
)
srtp_send
(
srtp_session_t
*
s
,
uint8_t
*
buf
,
size_t
*
lenp
,
size_t
bufsize
)
{
{
size_t
len
=
*
lenp
;
size_t
len
=
*
lenp
;
int
val
=
srtp_crypt
(
s
,
buf
,
len
);
size_t
tag_len
=
s
->
tag_len
;
if
(
val
)
return
val
;
if
(
!
(
s
->
flags
&
SRTP_UNAUTHENTICATED
))
if
(
!
(
s
->
flags
&
SRTP_UNAUTHENTICATED
))
{
{
size_t
tag_len
=
s
->
tag_len
;
*
lenp
=
len
+
tag_len
;
*
lenp
=
len
+
tag_len
;
if
(
bufsize
<
(
len
+
tag_len
))
if
(
bufsize
<
(
len
+
tag_len
))
return
ENOSPC
;
return
ENOSPC
;
}
int
val
=
srtp_crypt
(
s
,
buf
,
len
);
if
(
val
)
return
val
;
if
(
!
(
s
->
flags
&
SRTP_UNAUTHENTICATED
))
{
uint32_t
roc
=
srtp_compute_roc
(
s
,
rtp_seq
(
buf
));
uint32_t
roc
=
srtp_compute_roc
(
s
,
rtp_seq
(
buf
));
const
uint8_t
*
tag
=
rtp_digest
(
s
,
buf
,
len
,
roc
);
const
uint8_t
*
tag
=
rtp_digest
(
s
,
buf
,
len
,
roc
);
if
(
rcc_mode
(
s
))
if
(
rcc_mode
(
s
))
...
...
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