Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
9ca64c31
Commit
9ca64c31
authored
Jan 13, 2016
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avutil/common: Protect GET_BYTE in GET_UTF8() by ()
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
115fb6d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
common.h
libavutil/common.h
+2
-2
No files found.
libavutil/common.h
View file @
9ca64c31
...
...
@@ -356,13 +356,13 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* to prevent undefined results.
*/
#define GET_UTF8(val, GET_BYTE, ERROR)\
val=
GET_BYTE
;\
val=
(GET_BYTE)
;\
{\
uint32_t top = (val & 128) >> 1;\
if ((val & 0xc0) == 0x80 || val >= 0xFE)\
ERROR\
while (val & top) {\
int tmp=
GET_BYTE
- 128;\
int tmp=
(GET_BYTE)
- 128;\
if(tmp>>6)\
ERROR\
val= (val<<6) + tmp;\
...
...
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