Skip to content

Commit b7e0eba

Browse files
committed
vcomp/lavc/oapv: fix out-of-bound dereference
fixes CID 897313
1 parent 393a2d8 commit b7e0eba

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/video_compress/libavcodec.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Martin Pulec <pulec@cesnet.cz>
44
*/
55
/*
6-
* Copyright (c) 2013-2025 CESNET
6+
* Copyright (c) 2013-2026 CESNET, zájmové sdružení právnických osob
77
* All rights reserved.
88
*
99
* Redistribution and use in source and binary forms, with or without
@@ -1768,7 +1768,8 @@ static void
17681768
setparam_oapv(AVCodecContext */*codec_ctx*/, struct setparam_param *param)
17691769
{
17701770
auto it = param->lavc_opts.find("oapv-params");
1771-
if (it->second.find("profile=") != std::string::npos) {
1771+
if (it != param->lavc_opts.end() &&
1772+
it->second.find("profile=") != std::string::npos) {
17721773
return; // do not overwrite profile if set explicitly
17731774
}
17741775
const char *profile = nullptr;

0 commit comments

Comments
 (0)