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
b1b0baa3
Commit
b1b0baa3
authored
May 07, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/g2meet: Check init_get_bits8() return value
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
43e94d5a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
g2meet.c
libavcodec/g2meet.c
+8
-3
No files found.
libavcodec/g2meet.c
View file @
b1b0baa3
...
@@ -253,7 +253,8 @@ static int jpg_decode_data(JPGContext *c, int width, int height,
...
@@ -253,7 +253,8 @@ static int jpg_decode_data(JPGContext *c, int width, int height,
return
ret
;
return
ret
;
jpg_unescape
(
src
,
src_size
,
c
->
buf
,
&
unesc_size
);
jpg_unescape
(
src
,
src_size
,
c
->
buf
,
&
unesc_size
);
memset
(
c
->
buf
+
unesc_size
,
0
,
FF_INPUT_BUFFER_PADDING_SIZE
);
memset
(
c
->
buf
+
unesc_size
,
0
,
FF_INPUT_BUFFER_PADDING_SIZE
);
init_get_bits8
(
&
gb
,
c
->
buf
,
unesc_size
);
if
((
ret
=
init_get_bits8
(
&
gb
,
c
->
buf
,
unesc_size
))
<
0
)
return
ret
;
width
=
FFALIGN
(
width
,
16
);
width
=
FFALIGN
(
width
,
16
);
mb_w
=
width
>>
4
;
mb_w
=
width
>>
4
;
...
@@ -317,7 +318,7 @@ static int jpg_decode_data(JPGContext *c, int width, int height,
...
@@ -317,7 +318,7 @@ static int jpg_decode_data(JPGContext *c, int width, int height,
return
0
;
return
0
;
}
}
static
void
kempf_restore_buf
(
const
uint8_t
*
src
,
int
len
,
static
int
kempf_restore_buf
(
const
uint8_t
*
src
,
int
len
,
uint8_t
*
dst
,
int
stride
,
uint8_t
*
dst
,
int
stride
,
const
uint8_t
*
jpeg_tile
,
int
tile_stride
,
const
uint8_t
*
jpeg_tile
,
int
tile_stride
,
int
width
,
int
height
,
int
width
,
int
height
,
...
@@ -325,8 +326,10 @@ static void kempf_restore_buf(const uint8_t *src, int len,
...
@@ -325,8 +326,10 @@ static void kempf_restore_buf(const uint8_t *src, int len,
{
{
GetBitContext
gb
;
GetBitContext
gb
;
int
i
,
j
,
nb
,
col
;
int
i
,
j
,
nb
,
col
;
int
ret
;
init_get_bits8
(
&
gb
,
src
,
len
);
if
((
ret
=
init_get_bits8
(
&
gb
,
src
,
len
))
<
0
)
return
ret
;
if
(
npal
<=
2
)
nb
=
1
;
if
(
npal
<=
2
)
nb
=
1
;
else
if
(
npal
<=
4
)
nb
=
2
;
else
if
(
npal
<=
4
)
nb
=
2
;
...
@@ -344,6 +347,8 @@ static void kempf_restore_buf(const uint8_t *src, int len,
...
@@ -344,6 +347,8 @@ static void kempf_restore_buf(const uint8_t *src, int len,
memcpy
(
dst
+
i
*
3
,
jpeg_tile
+
i
*
3
,
3
);
memcpy
(
dst
+
i
*
3
,
jpeg_tile
+
i
*
3
,
3
);
}
}
}
}
return
0
;
}
}
static
int
kempf_decode_tile
(
G2MContext
*
c
,
int
tile_x
,
int
tile_y
,
static
int
kempf_decode_tile
(
G2MContext
*
c
,
int
tile_x
,
int
tile_y
,
...
...
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