Message ID | HE1PR0301MB2154FA9394015BAEA35CF0278F5F9@HE1PR0301MB2154.eurprd03.prod.outlook.com |
---|---|
State | Accepted |
Commit | 79402e2c36301fb0ecb1ff797a8de7f79b178c70 |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a11:4023:0:0:0:0 with SMTP id ky35csp2016614pxb; Thu, 29 Apr 2021 17:01:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+YswU0rhG9TS6HoYTN6LFR21yOfmUGDtnrjD4HR8yZJZlWj+Nsbx39tNoZTbY9+QnqLRe X-Received: by 2002:a17:906:b048:: with SMTP id bj8mr1128256ejb.236.1619740861629; Thu, 29 Apr 2021 17:01:01 -0700 (PDT) Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id sa7si1986312ejb.243.2021.04.29.17.01.01; Thu, 29 Apr 2021 17:01:01 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=SmmVotGT; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CD0A568A328; Fri, 30 Apr 2021 02:59:28 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR06-AM7-obe.outbound.protection.outlook.com (mail-am7eur06olkn2106.outbound.protection.outlook.com [40.92.16.106]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E5E01689F4F for <ffmpeg-devel@ffmpeg.org>; Fri, 30 Apr 2021 02:59:27 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z1seQeAvUNXooZ5VNvxr8y2aDzv8szzA664L9maGBvPGHfZLswNecrJbRgPWhspFA9f1tl7/DA5+k53xMfxu8Tp9+Ucdhcqmp1uwX5edRxXB7VrZyO1meGaN1p4azT7Gl67AZbI8L9TRMKB/T13ObiaOMEmvDXruJte97DjVDmxF8hM33s0IfT9ZE4CirIpvK7f4muh0D/uPHsX7vkreCNqtUy5PIyfKrMUwmqylC29Q+PO8ceU3JELffhUtzwiUSz5kKJKaqncKAc78b3GXEoXNe1G7JJkZo1GALtB9nL2po0Zei9WoymfMSF8aV6YD06NZN918qttWyb6whLdK7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zdvsghTMqRPUIlVGtNPDxFdAaDKllSD3XEGvO+sMxuo=; b=hS1xDgyNDavSI0VF8UjYH/Oojr8Nfx5hqZua4PMONeMrllNTmm7d/8gnJkSVPFVV0+YfOjiRSBIOXypN/2NsNvUoaAKhMnF81aLEl59hohkO9LuYKFopZyJpmg1VxzW/GBP17NqcL7nzHcrUjSFyO8WJSdqL05rvy+m4b8Ruc18FXoTHTR+IxyXiVgvh+m0enk6YU83VQ1QnQ9TfncSxHanjSZb1SRz1cPLi043T4WojFcljKkRH9I42be1uzqC0C9vReXliLQdZud+I+k+TM7ccCjMryjR6thGFhgcIj/iD9QOHFN8RN6cqZ5y523UQ8l0xwr3om8SpIsNUFmjY+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zdvsghTMqRPUIlVGtNPDxFdAaDKllSD3XEGvO+sMxuo=; b=SmmVotGTnxDaBU35r4wQdM1y2FlnKFwIJ68muF56UtXzWcvRLf+FLXG27USY2E9FDVM+cIPgSboGwtS4cW3GTwC27Hpm4s1xfQXrXccx8QGt9l9mS2nPZiJu3oYr69f1jbj3wlYVea3bH2cqt2VGDJtPUyI3BQ9G3T2pp3DM4ynFVaTFodie40YzlUXPUOtsat3h7Dn6kByrFSPpikBTzDwFrYYn0E4O9j34NFsnXc5Zl8RKthEWgfEiMaQMqGyphu40FwKbr4X/ClPq1oYbLkYwV6ZOj7ojL0rrdEyodFsGH5XtqZZYPA7rTXHHpTgMEJYZ0bJB/rmZ7IRFTGMHeg== Received: from AM7EUR06FT055.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::4c) by AM7EUR06HT175.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::327) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.27; Thu, 29 Apr 2021 23:59:26 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:fc36::49) by AM7EUR06FT055.mail.protection.outlook.com (2a01:111:e400:fc36::61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.27 via Frontend Transport; Thu, 29 Apr 2021 23:59:26 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:D599E2FD0A275AADC4CA7FB758D358BCD58C7C2FF56E91FC2901230FF7DB62FC; UpperCasedChecksum:3A772E26CA9FD26BA25D3668BF47A26F4CB49D6A4F7CDB2E33270A4C47EC19C9; SizeAsReceived:7588; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7%5]) with mapi id 15.20.4065.027; Thu, 29 Apr 2021 23:59:26 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Fri, 30 Apr 2021 01:56:53 +0200 Message-ID: <HE1PR0301MB2154FA9394015BAEA35CF0278F5F9@HE1PR0301MB2154.eurprd03.prod.outlook.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <HE1PR0301MB2154FA2BF76462B67F0D851C8F5F9@HE1PR0301MB2154.eurprd03.prod.outlook.com> References: <HE1PR0301MB2154FA2BF76462B67F0D851C8F5F9@HE1PR0301MB2154.eurprd03.prod.outlook.com> X-TMN: [zvgxONxvCZYPXX0CD3C4Xk5zwRHGlRAe] X-ClientProxiedBy: ZR0P278CA0088.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::21) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210429235717.2067041-21-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.193.248.86) by ZR0P278CA0088.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.27 via Frontend Transport; Thu, 29 Apr 2021 23:59:25 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: f90549ee-a4a9-43a6-332e-08d90b6ad19e X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UIO6YRda03MtHguxZve2k0PPQ+hppdbUVZk5oRVLNGDdXzQDINwa3b8q++oNUw3PD6TxAnZAL9AoZus1/ZtPb+emBMiDqo/mvoW/wr0w7mDzPqeniXzOUMe8SQmIanQaJC/RuRI3VXugsLpawI1mFktWMWgUsZ2UtIzCkR0C3I5J2fyHxIMCKl0/IphDSaruTIkmSvbYP3yAFUwo9lYSOwmAvKZSkpHmUcbvgk3vMx1QxoQSBnOfTuPbcZNROAp4I01rhd7QYW//9lFPrvob9Skv8hNH5dO7MM32KgCMbZuS4iBIoJoiuNmHr9UF/7onrknFk9pD261q28efQsmhXz2JcbgOoFRl6xMaXvtmDl3ipyBmxLCiyNMgMbcZoWdv9zZye/dGXKqr1NxNothCHb/nsykw2/nxf1W/JbXn66NzlXPgxQY/AoXCyiftBgezLyUVwTR4OLbC2Bm8077fMgoG3sdTv11VXmd0LtVRDqSCogVA/O+gddjOgHiwfZWmPQgL1uSAluNohDwHKR2jTcYG789P4uda+eWEqLXjafu+juE9VhtrSFqc7Ktxh+65cmnsQH2ZIebMrS1xoSbPwKFnPVGmJrvgBl/5H/kKC2Vu8/JObpZVNwijjQiSOHfS3fRGIZEyyWH7jlw/OmslWxauAUfJb35FxIQwEuuun0HV2sPXywTHQG2/1T/4NGt4Gs7bLTEv5FzNA== X-MS-TrafficTypeDiagnostic: AM7EUR06HT175: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 30kQkGSqIao72snWXzVM3zjhT91Fw3BsBFGwvPIchTrtQ8C/q4dDEh/JZujDLCbgqzQkvxIDU3U+G+vCkXAaUkBNvzkbmtfV1nIVa0cI1fbK5eiaWNMNAQuo0+IMitmQD2l1KAP/I9GiO9ETZUZ87ldNdJef531W6vtKLyjfmD4Xx0GbKAi610dFU3wCdzZawGERvucqirSXssxC7TV/X4JeeLvc1D+kaQ1M8no+1dkfVkrbps+BSSTkSbYtfk3Q9CTZNAqsQqBMGyzy43jbEar7cvQf2jnW6eOcT1qEx3JPRUcNkK+hO4Z3KlC6P9wun5+Rnfnl//GOFjjJSeXogXieh1LNJsjvTflQ7qOm+ITyTy/dofaH3ZQLXJgDDAYPTsrPzPL1FWlbvyHfrCAfxA== X-MS-Exchange-AntiSpam-MessageData: cF7xGrmWIQekyzoVE5WPGyfBvjxQqupIXsIe/hDQDtPFDgUdZjGLNDrpw6coW0jdi8hhx0fkSA32LJMa4+r4v+Ifl1w+srDpGW5wRsqax8q9q+QWn+I1vswXdt9hFIhgpw4+m6eYVx/mSgCNWOJyoQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f90549ee-a4a9-43a6-332e-08d90b6ad19e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 23:59:26.3129 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT055.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7EUR06HT175 Subject: [FFmpeg-devel] [PATCH 22/46] avcodec/jpeglsenc: Check for invalid dimensions X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: PiQ13UyZv3nb |
Series |
[FFmpeg-devel,01/46] avcodec/a64multienc: Avoid intermediate buffer
|
expand
|
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c index 3e73b04c0e..15d9204b1d 100644 --- a/libavcodec/jpeglsenc.c +++ b/libavcodec/jpeglsenc.c @@ -413,6 +413,15 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, return 0; } +static av_cold int encode_jpegls_init(AVCodecContext *avctx) +{ + if ((avctx->width | avctx->height) > UINT16_MAX) { + av_log(avctx, AV_LOG_ERROR, "Dimensions exceeding 65535x65535\n"); + return AVERROR(EINVAL); + } + return 0; +} + #define OFFSET(x) offsetof(JPEGLSContext, x) #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { @@ -439,6 +448,7 @@ const AVCodec ff_jpegls_encoder = { .priv_data_size = sizeof(JPEGLSContext), .priv_class = &jpegls_class, .capabilities = AV_CODEC_CAP_FRAME_THREADS, + .init = encode_jpegls_init, .encode2 = encode_picture_ls, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_BGR24, AV_PIX_FMT_RGB24,
The dimensions are written on two bytes. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/jpeglsenc.c | 10 ++++++++++ 1 file changed, 10 insertions(+)