From patchwork Fri Aug 18 08:02:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 4740 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.46.211 with SMTP id u202csp498254vsu; Fri, 18 Aug 2017 01:02:38 -0700 (PDT) X-Received: by 10.28.59.8 with SMTP id i8mr990900wma.53.1503043358558; Fri, 18 Aug 2017 01:02:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503043358; cv=none; d=google.com; s=arc-20160816; b=Gmfaxkq+1C0G85tk87kSQfZ4ar3r5vy9tyV4EXpAhaPysT5L2xDAp8umOTwTwip1pl qoydjhfevfXxs42Fe6MOy34X4sXuhjUqwXSNi6R6aHIYuIWlOi/wxSNsQ9jOBrCzdoPZ aA4rDKnW4V5HdCnJbp/RZ6DnEyiY7F8nAQdEeeFtWojnrMTRD6NVzhjnqHlJt7C34LnE 9n/Ng3P7h/b9J1xZWioO1fbemIFpQCpWdJUUceojDRbjpzS9bVhdpz+b06qXwT0PWlub M3cJNfM7105qlN49NHkqJ2tY077iVUDeVJLHXTPN4sHvqfgoJrsx+9MStx+MNpxLr9XK sGWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:mime-version:dkim-signature:delivered-to :arc-authentication-results; bh=BKWhRXjgcWe50ZZfPzitHX9UIhON6mxiOd8CvKP6jtY=; b=U65FcytAYdrS26q7iGunzyYcym9g6arPnlkyDDXKZtAoSvSRnsaDRb/E78VTZ8AfSw cgMzVMWWl+eEMZcN+Sf30v6WxMgcw7B7j5iUebRcpeQe9SYo37P+PUJCzWXs+h3GGgLl 9+DWX9y7671FbEkxiPJn9HdEUxhEY6jtnG88mBc69D5B438uhIOW+xDoZ2B6tmLwqAkZ U+hTtlZ2PMOtjoW8A2Wk2PRK6hvA+c4n9J0SHPE59HFeqNsVgBBkduQZZVkuDoYJXhRd DXLm6p4Tek4Qs0AifcH4QX9nd/htirQCr6HO0WSoh/tbgmqocUkKo9vfk1skP+c/n2G7 MsHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=scq+BhE1; 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=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 140si744319wmm.132.2017.08.18.01.02.37; Fri, 18 Aug 2017 01:02:38 -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=@gmail.com header.s=20161025 header.b=scq+BhE1; 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=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5C7AA6897EE; Fri, 18 Aug 2017 11:02:28 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ua0-f181.google.com (mail-ua0-f181.google.com [209.85.217.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DB2C268829E for ; Fri, 18 Aug 2017 11:02:20 +0300 (EEST) Received: by mail-ua0-f181.google.com with SMTP id n29so1220935uai.5 for ; Fri, 18 Aug 2017 01:02:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=eKFhj3u2uZsa0ZmRhNc7ZHscK0MfScpt3IAlnz4EPxw=; b=scq+BhE1+Jtvs2GusHz4ka++TUuQkJUdaoPYbuK3VF5N7wi6ll5QoekJOEV836ECYX zWt9pICj+djBMaDYgredWfylfUxIBkbROHmU2n240xOj/Qj+iFS988gyxIVsfwBLMzhq NdfS/8EaJsASiW0b3yPFQETbs5RNR62BfNAihl2HAh6ToAyUMXZdCPmushTIDQ1sWOnN M7tV0ijcIDW6FSbhmrErQVCBmqiWMPUZtt6Wxg+gAjJK4T2FmpRWY1QbrCxDzJNQecL1 pGQDz2OztGZs8DGlLbBs8B2cVuB/UbUCCRVF0XhkI4s1DeYnLwJmdu8hvVUzSVuozm2G 4ezw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=eKFhj3u2uZsa0ZmRhNc7ZHscK0MfScpt3IAlnz4EPxw=; b=cqC5confckYa+BXT7u3wnSkweNO5CxfLDTuD8skmzclFZhr8yCWSYhhetCwF6P16FG yOYqOteAidanQyFco6YgvGrfY7o69a9+78+vmNaWj4Gt9HonhlPsO47WEAZJeFRmSnGT 4xoNUJXMvtiGChCwDO2XULv9IbjYsFyvZXX+0BFfYaPKxLX/06JS8bBNNui6HohwleX4 5IDznMUFKJ3ytmrNHKPlhUT0vq0DxGubXfZrXtEVkDSeXtenyctZC6TdCO0Shpc1JK3d VkaBKqNV2Ahd2N2XM46blIbDWdh82hS1aPRL8X8CGMxt4HZdYd8FHZFRBUY3s6yckBdh 4AAw== X-Gm-Message-State: AHYfb5gLD2wRnaBYCE2QO0pmT7rD/G6QesFgjsqAp9EcjCj+Wo4PLkRc xxdIZ+DZrBgOsrC4dFKsI/2inHZ9GHfZ X-Received: by 10.159.40.135 with SMTP id d7mr5612608uad.154.1503043344527; Fri, 18 Aug 2017 01:02:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.55.141 with HTTP; Fri, 18 Aug 2017 01:02:03 -0700 (PDT) From: Carl Eugen Hoyos Date: Fri, 18 Aug 2017 10:02:03 +0200 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH]lavd/libdc1394: Avoid a null pointer dereference 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: Josh de Kock Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi! Attached patch - that I cannot test - is meant to fix a bug reported at launchpad: https://bugs.launchpad.net/ubuntu/+source/ffmpeg/+bug/1710849 Please comment, Carl Eugen From 6db6b36a36da95de9b2bae34313710df5b126811 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Fri, 18 Aug 2017 09:56:08 +0200 Subject: [PATCH] lavd/libdc1394: Do not crash if dc1394_camera_new() fails. Fixes Ubuntu bug 1710849 --- libavdevice/libdc1394.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavdevice/libdc1394.c b/libavdevice/libdc1394.c index afffd89..f435856 100644 --- a/libavdevice/libdc1394.c +++ b/libavdevice/libdc1394.c @@ -190,6 +190,13 @@ static int dc1394_read_header(AVFormatContext *c) /* FIXME: To select a specific camera I need to search in list its guid */ dc1394->camera = dc1394_camera_new (dc1394->d, list->ids[0].guid); + + if (!dc1394->camera) { + av_log(c, AV_LOG_ERROR, "Unable to open camera with guid 0x%"PRIx64"\n", + list->ids[0].guid); + goto out; + } + if (list->num > 1) { av_log(c, AV_LOG_INFO, "Working with the first camera found\n"); } -- 1.7.10.4