mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 07:31:22 +01:00
avcodec/j2kenc: Check for av_strtok() failure
Fixes: CID1466601 Dereference null return value Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9d40782088
commit
6a6a765fa4
1 changed files with 1 additions and 1 deletions
|
|
@ -1682,7 +1682,7 @@ static int parse_layer_rates(Jpeg2000EncoderContext *s)
|
|||
}
|
||||
|
||||
token = av_strtok(s->lr_str, ",", &saveptr);
|
||||
if (rate = strtol(token, NULL, 10)) {
|
||||
if (token && (rate = strtol(token, NULL, 10))) {
|
||||
s->layer_rates[0] = rate <= 1 ? 0:rate;
|
||||
nlayers++;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue