Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
a9d0ab74
Commit
a9d0ab74
authored
Jul 10, 2009
by
JP Dinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace for() (rand() & 0xff) with vlc_rand_bytes(); in RTMP handshake.
parent
a7b45ce8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
modules/access/rtmp/rtmp_amf_flv.c
modules/access/rtmp/rtmp_amf_flv.c
+10
-13
No files found.
modules/access/rtmp/rtmp_amf_flv.c
View file @
a9d0ab74
...
...
@@ -15,9 +15,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
*
along with this program; if not, write to the Free Software
*
Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
* You should have received a copy of the GNU General Public License
along
*
with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
...
...
@@ -33,6 +33,7 @@
#include <vlc_network.h>
/* DOWN: #include <network.h> */
#include <vlc_url.h>
#include <vlc_block.h>
#include <vlc_rand.h>
#include <stdlib.h>
#include <stdint.h>
...
...
@@ -338,18 +339,14 @@ rtmp_handshake_active( vlc_object_t *p_this, int fd )
int
i
;
p_write
[
0
]
=
RTMP_HANDSHAKE
;
for
(
i
=
0
;
i
<
RTMP_HANDSHAKE_BODY_SIZE
;
i
++
)
{
if
(
i
<
8
)
{
p_write
[
i
+
1
]
=
0x00
;
}
else
{
p_write
[
i
+
1
]
=
rand
()
&
0xFF
;
}
}
for
(
i
=
0
;
i
<
8
;
i
++
)
p_write
[
i
+
1
]
=
0x00
;
vlc_rand_bytes
(
p_write
+
1
+
8
,
RTMP_HANDSHAKE_BODY_SIZE
-
8
);
/* Send handshake*/
i_ret
=
net_Write
(
p_this
,
fd
,
NULL
,
p_write
,
RTMP_HANDSHAKE_BODY_SIZE
+
1
);
i_ret
=
net_Write
(
p_this
,
fd
,
NULL
,
p_write
,
RTMP_HANDSHAKE_BODY_SIZE
+
1
);
if
(
i_ret
!=
RTMP_HANDSHAKE_BODY_SIZE
+
1
)
{
msg_Err
(
p_this
,
"failed to send handshake"
);
...
...
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