From patchwork Fri Feb 2 23:11:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niki Bowe X-Patchwork-Id: 7495 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.150.1 with SMTP id c1csp36118jai; Fri, 2 Feb 2018 15:12:17 -0800 (PST) X-Google-Smtp-Source: AH8x226RiTQR7YCdATBszkZLxrDeMZ6WwpFfdIoqRTIt2ixFBubB+L+YmFr3xQUMGW3xxrnObsd8 X-Received: by 10.28.10.6 with SMTP id 6mr29570270wmk.1.1517613137373; Fri, 02 Feb 2018 15:12:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517613137; cv=none; d=google.com; s=arc-20160816; b=Vo7TZ0BfW9qcGW81sJ/NrOTdadAvoP/CL4m6rnI9XEwikLpl0RU4icQB8Dp1JP78Mq /zbq472gWexKhcRJUXYON7jpZIm095oQPHyLrjNXn9nvODt5V1ZkUytrgM3rztZ+OUV+ UDWrruZqBo8sU6//rX2L4YoI0aKOqbS6H5MtL0ThoHzHgl/8r9UKeZQGuk4orxMcUmEo wuGyqkIvInD8HBWvDDU4mem5q6KsHVmhBx0ianY1yBD830WB2aIO8eL39JDo9+Qvx0e5 j0Qu/7BsY5Gs6+Qf4ciTVAuocWI/SOdrC1G8DHlPgTzSH7H4BTX1P61PMjwEk1pl6vpJ qHLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=CC4Dy70tpPrHgeFzrJreiURLqP/dAqPEN5y2MNTSNLM=; b=Ui1PXP9LQKHmK0U52fk1C4bo8w5BLJovqEZg7XOmq4FDaxjMHJ7N0vQc509IsE6Oah pbpu3Z2HgTvKcghk/RGhoaFSi8WHhOhc+/XBK8xJcaz/kU6brEASm6g9KMi2c7o6iiAp j0VWRrfAHLimODpy/jdpzAVz8Eqhl0THkSstx0Nh1bsCerdIjvzOMKXyJSWXY9xNdqJV nEiE5j+n7nVfrwILCWxou5JRo4y+TRyRvz+fnakJ9mX+U8DAjxrIt572O/zRIDFnvVjs 319XOj3my75yaiWwo759p53MNSDKB8KS1y/VjBcS44uEnZjRCsIeVoxizt/P1SCqT5Ta S3uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@google.com header.s=20161025 header.b=g+7P6R8I; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id t135si1858067wmt.257.2018.02.02.15.12.17; Fri, 02 Feb 2018 15:12:17 -0800 (PST) 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=@google.com header.s=20161025 header.b=g+7P6R8I; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A97F56882F6; Sat, 3 Feb 2018 01:12:09 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl0-f42.google.com (mail-pl0-f42.google.com [209.85.160.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 56E3C6800A7 for ; Sat, 3 Feb 2018 01:12:03 +0200 (EET) Received: by mail-pl0-f42.google.com with SMTP id k8so5077983pli.8 for ; Fri, 02 Feb 2018 15:12:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=q7+8apENM1WrwGA40FIeWOqFWDqby0ZNIMIcBfMUCZs=; b=g+7P6R8IKDMWqHfE+0yCjdJ/r+q5Hn68CjJVoThXu3D0awcTLWKjMrBW0cTWagpm2x T9NKthfPkNhTo5y7ioanAnLam3n/aN1aqwhC1dBOqJdY4aXbCZ5b2DuzN8V1yM+yYJHa 42TxUeLFhcdejFS2As6X+uEfCXwl8o5fgvHnhl4KjzBIqQF6Fd4rEFRI6lrZi8Bf0ZAp m7/N8wiV/XPBFHmXR5My8yue/91/ezbNi+yngIzQ99XGTPIGxuI2bzoHFU6S0za9HQEz XlmR7cdLj49oRJG679lILBMcRK4HrwHe5B3dwacpsTErXiR7txQ1HfOeMLK3iXNyC7te +Fsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=q7+8apENM1WrwGA40FIeWOqFWDqby0ZNIMIcBfMUCZs=; b=L8xSqUODoWwgPUAKVES7310YhaHRs2W/XRL6cDdRph2WLEA4alYJaK1QvrwngHPo9O NT1OYialBs5Ca+qLZ07xmTuT4dd7Nn920Uz1pEWLcRYIeSu9NMmZYjAFZt02QE87mncP wQPRTGXkqnv66CJ/hUtMNr6hK2fjOtmzlcoyzMPPfCtLk5AUbMT8s3DiyvHE6Hut4i7Q 3OZSC/z4JB+s3adjzadVbAvES6QRnigxo4jQv1v1fgKn9hpvryl7G9KkWI7etDGQ0eoh BwxTUelwiu5uM+QCenBt7OeBtPd1shTShThMQrvI/W5FTli0bfI9irccy+3C9R55UYhS nvPg== X-Gm-Message-State: AKwxytdMNYGs0jQ6zBGbFMl2Ms7/zyVGnSJPLjHRnEVcDrlpIfjX++5o slwbs+m4s1ALab44vxBajVXBjMHoyF8= X-Received: by 2002:a17:902:bc47:: with SMTP id t7-v6mr5907782plz.200.1517613127734; Fri, 02 Feb 2018 15:12:07 -0800 (PST) Received: from nbowe.mtv.corp.google.com ([100.98.2.61]) by smtp.gmail.com with ESMTPSA id a9sm5355710pfi.55.2018.02.02.15.12.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 02 Feb 2018 15:12:06 -0800 (PST) From: Nikolas Bowe To: ffmpeg-devel@ffmpeg.org Date: Fri, 2 Feb 2018 15:11:04 -0800 Message-Id: <20180202231104.195565-1-nbowe@google.com> X-Mailer: git-send-email 2.16.0.rc1.238.g530d649a79-goog Subject: [FFmpeg-devel] [PATCH] Fix crash in join filter X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Nikolas Bowe MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Previously if ff_outlink_frame_wanted() returned 0 it could dereference a null pointer when trying to read nb_samples. --- libavfilter/af_join.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c index cf5131e8dc..4f86e13558 100644 --- a/libavfilter/af_join.c +++ b/libavfilter/af_join.c @@ -485,6 +485,9 @@ static int activate(AVFilterContext *ctx) return 0; } } + if (!s->input_frames[0]) { + return 0; + } } nb_samples = s->input_frames[0]->nb_samples;