From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by master.gitmailbox.com (Postfix) with ESMTPS id EFF16406E7 for ; Wed, 22 Dec 2021 15:13:51 +0000 (UTC) Received: by mail-pj1-f46.google.com with SMTP id o63-20020a17090a0a4500b001b1c2db8145so6129956pjo.5 for ; Wed, 22 Dec 2021 07:13:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:from:date:subject:fcc:content-transfer-encoding :mime-version:to:cc; bh=dNeifAanxvZoZbyzk7JvTR+Nd1pVdpRMV3FYwtjCKfM=; b=BIXYCy27PDvJAf49YihD7I0CZYa5/0fQ0IlMLFd3VKVdWtvEGqulqDuPbLG0Ct5X9O BJjy7lHL5+yaiwqLMZKxMoibGunz5hdevu4FDkSjtI9/fVJpjrJG6bZ4GBKFRpdd5yTB 6GbtB9Cj3Mqtr46OJKqFAVSR6rMthNfcxrtqwAiu1bJTT1hvQ7yEB8W6QS0O/3/eTqBo GQBjKzGVOREo5Rl1QDAeUTgf4shfzHjpIIU1MO+ZrFkOy6SwEjjMKm1663WLHzG3A/1k gaoAfGOkb4J8FJ53IEQN5q156b1y/M6p4qXg0sRuKe+2I+236XKieXLd/I/hjCmG+OfB XzOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=dNeifAanxvZoZbyzk7JvTR+Nd1pVdpRMV3FYwtjCKfM=; b=Pln0otj7+lfcP4VLoT7LOVlRoyb2+aj6w32o1DhQJeMxHUoS4aTnuA9qMTEEqYBX8A q+1ZoaLcUyL/19BTVu5OFj0ukwC6SiT4j6t+KCpRafbz6pVB/oZB55JkWhnoCcFPdfbF tGVxMkr6+VBhkY17fUA/Bp4UnIphJS1Zj5oUEbAdrpM+Kl4lFLRPG5dPSOnng8mC7eQR yB6oV6CsyLNornZxU3hHqE1cgbKWy4EYztQ81Vohl15xJaZ5DJBn3koHYsJ1ztgIkvKv vcnzm7fOkFc8IPEyJRsKDbpdcUNF+zzq9uUdH6E43a63JEFMEA2Nf49YUuMDVsBIlLnM z4zQ== X-Gm-Message-State: AOAM532iIoZ2QrYeT3Ws46QTuQodnMJwXt++FJ8e9ssE/MgTJxs4X/VZ Wa9BG+90BJ4RgUHxzWTJeN7nWybK1o/jR9S+ X-Google-Smtp-Source: ABdhPJzPbnW9pceSLGZVXD3H27NnJV6rkqiMcF1EhxdjEsunIU5hCvAU+id5r5lKuO3B1dxz/SV9fQ== X-Received: by 2002:a17:902:db07:b0:149:a80:1070 with SMTP id m7-20020a170902db0700b001490a801070mr3041068plx.27.1640186031522; Wed, 22 Dec 2021 07:13:51 -0800 (PST) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id y11sm2788318pfn.7.2021.12.22.07.13.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Dec 2021 07:13:50 -0800 (PST) Message-Id: From: ffmpegagent Date: Wed, 22 Dec 2021 15:13:39 +0000 Subject: [PATCH 00/11] libavformat/asf: fix handling of byte array length values Fcc: Sent Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 To: ffmpegdev@gitmailbox.com Cc: softworkz Archived-At: List-Archive: List-Post: The spec allows attachment sizes of up to UINT32_MAX while we can handle only sizes up to INT32_MAX (in downstream code) The debug.assert in get_tag didn't really address this, and truncating the value_len in calling methods cannot be used because the length value is required in order to continue parsing. This adds a check with log message in ff_asf_handle_byte_array to handle those (rare) cases. softworkz (11): libavformat/asf: fix handling of byte array length values libavformat/asfdec: fix get_value return type and add checks for libavformat/asfdec: fix type of value_len libavformat/asfdec: fixing get_tag libavformat/asfdec: implement parsing of GUID values libavformat/asfdec: remove unused parameters libavformat/asfdec: fix macro definition and use libavformat/asfdec: remove variable redefinition in inner scope libavformat/asfdec: ensure variables are initialized libavformat/asfdec: fix parameter type in asf_read_stream_propertie() libavformat/asfdec: fix variable types and add checks for unsupported values libavformat/asf.c | 12 +- libavformat/asf.h | 2 +- libavformat/asfdec_f.c | 349 ++++++++++++++++++++++++++--------------- 3 files changed, 232 insertions(+), 131 deletions(-) base-commit: 15cfb4eee316a1d6a0764f4460409f0258fd94cb Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-12%2Fsoftworkz%2Fmaster-upstream_asf_4-v1 Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-12/softworkz/master-upstream_asf_4-v1 Pull-Request: https://github.com/ffstaging/FFmpeg/pull/12 -- gitgitgadget