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
02646f21
Commit
02646f21
authored
Aug 03, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed non const static variable usages in mp4 drms.
parent
fad4fcda
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
modules/demux/mp4/drms.c
modules/demux/mp4/drms.c
+17
-17
No files found.
modules/demux/mp4/drms.c
View file @
02646f21
...
...
@@ -751,8 +751,6 @@ static void DoShuffle( struct shuffle_s *p_shuffle,
uint32_t
*
p_bordel
=
p_shuffle
->
p_bordel
;
unsigned
int
i
;
static
uint32_t
i_secret
=
0
;
static
const
uint32_t
p_secret3
[]
=
{
0xAAAAAAAA
,
0x01757700
,
0x00554580
,
0x01724500
,
0x00424580
,
...
...
@@ -763,21 +761,11 @@ static void DoShuffle( struct shuffle_s *p_shuffle,
0xD5DDB938
,
0x5455A092
,
0x5D95A013
,
0x4415A192
,
0xC5DD393A
,
0x00000080
,
0x55555555
};
static
const
uint32_t
i_secret3
=
sizeof
(
p_secret3
)
/
sizeof
(
p_secret3
[
0
]);
static
char
p_secret4
[]
=
static
c
onst
c
har
p_secret4
[]
=
"pbclevtug (p) Nccyr Pbzchgre, Vap. Nyy Evtugf Erfreirq."
;
if
(
i_secret
==
0
)
{
REVERSE
(
p_secret3
,
sizeof
(
p_secret3
)
/
sizeof
(
p_secret3
[
0
])
);
for
(
;
p_secret4
[
i_secret
]
!=
'\0'
;
i_secret
++
)
{
#define ROT13(c) (((c)>='A'&&(c)<='Z')?(((c)-'A'+13)%26)+'A':\
((c)>='a'&&(c)<='z')?(((c)-'a'+13)%26)+'a':c)
p_secret4
[
i_secret
]
=
ROT13
(
p_secret4
[
i_secret
]);
}
i_secret
++
;
/* include zero terminator */
}
static
const
uint32_t
i_secret4
=
sizeof
(
p_secret4
)
/
sizeof
(
p_secret4
[
0
]);
/* It include the terminal '\0' */
/* Using the MD5 hash of a memory block is probably not one-way enough
* for the iTunes people. This function randomises p_bordel depending on
...
...
@@ -827,8 +815,20 @@ static void DoShuffle( struct shuffle_s *p_shuffle,
AddMD5
(
&
md5
,
(
const
uint8_t
*
)
p_big_bordel
,
64
);
if
(
p_shuffle
->
i_version
==
0x01000300
)
{
AddMD5
(
&
md5
,
(
const
uint8_t
*
)
p_secret3
,
sizeof
(
p_secret3
)
);
AddMD5
(
&
md5
,
(
const
uint8_t
*
)
p_secret4
,
i_secret
);
uint32_t
p_tmp3
[
i_secret3
];
char
p_tmp4
[
i_secret4
];
memcpy
(
p_tmp3
,
p_secret3
,
sizeof
(
p_secret3
)
);
REVERSE
(
p_tmp3
,
i_secret3
);
#define ROT13(c) (((c)>='A'&&(c)<='Z')?(((c)-'A'+13)%26)+'A':\
((c)>='a'&&(c)<='z')?(((c)-'a'+13)%26)+'a':c)
for
(
uint32_t
i
=
0
;
i
<
i_secret4
;
i
++
)
p_tmp4
[
i
]
=
ROT13
(
p_secret4
[
i
]
);
#undef ROT13
AddMD5
(
&
md5
,
(
const
uint8_t
*
)
p_tmp3
,
sizeof
(
p_secret3
)
);
AddMD5
(
&
md5
,
(
const
uint8_t
*
)
p_tmp4
,
i_secret4
);
}
EndMD5
(
&
md5
);
...
...
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