From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 88FEC449C8 for ; Mon, 5 Dec 2022 22:27:46 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7BEDB68BD05; Tue, 6 Dec 2022 00:27:45 +0200 (EET) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8B05A68B9CA for ; Tue, 6 Dec 2022 00:27:39 +0200 (EET) Received: by mail-pf1-f182.google.com with SMTP id 130so12791134pfu.8 for ; Mon, 05 Dec 2022 14:27:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=UpjwVuA21YiQuYoxKlUwAZUHgSs3Nv6cAy4tufWe0Ko=; b=Y37AAg2M4eV2J17rSCSghNM++iF6IwvzCKY/mJKWOSPwtmd1NTKcp9AE408tw8aSEX 5dmwyNVJ5kAffx5/H7orMUXuW89eWqQaRbzYLFPQPg9nnJ9HHU6mc4dRAjPG35Vd9EJb G8y8FV+cNzo+rarpiTnAHT+cHW6ksSB4rup+o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=UpjwVuA21YiQuYoxKlUwAZUHgSs3Nv6cAy4tufWe0Ko=; b=WU+H2+7PDZIBIClQ7ZAGAtPgF8QCi8uDi2zG3cp9fFPCNiExzoQjs1/gst6+VUejPU jh6RLn/9dW4fS1cw3tk/s0kpJ78Yn7xAU9t3bvogMq6Zci2fmLwkwt7tffxeHJJ5EZ0J JYyhbeKtzuEOhOhYIJrqM5zjqN2VBKotZvuAluTutTM6YMlDIZar5xw+w+ezy4TAes3h 2I5vN3wSx8cK5k73gVo9I579Ln8/7gOAOmypvNFE2Bo/eBUttEiMcKRJtrBttpYI4CrA TjgF8CcmtPu2vRv3lsDWboySO+we3kqApaEUR+bmRCTFTk3t2dqdAOTVFDUqUbF9Nmxg y5Yw== X-Gm-Message-State: ANoB5pkc+blGNorc232uR66wO2PP6WldwFlB5BblVN4HslqIRKNJQcGg hPmPFwT/mpAGnkCG2DoCrCg1bA== X-Google-Smtp-Source: AA0mqf7tGzpcQDw4e3w5niD8qVS73jFzGljoVburMdG/1JnEdVOcqd58tFDWJLsHEuNA0XhNdh84HA== X-Received: by 2002:a62:9409:0:b0:572:ccf6:e7c7 with SMTP id m9-20020a629409000000b00572ccf6e7c7mr68837137pfe.74.1670279257993; Mon, 05 Dec 2022 14:27:37 -0800 (PST) Received: from google.com ([2620:15c:9d:2:9b83:ae6f:f47b:bb4d]) by smtp.gmail.com with ESMTPSA id d12-20020a17090a2a4c00b0021952b5e9bcsm11329670pjg.53.2022.12.05.14.27.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Dec 2022 14:27:37 -0800 (PST) Date: Mon, 5 Dec 2022 14:27:35 -0800 From: Brian Norris To: "Xiang, Haihao" Message-ID: References: <20221123215444.1754721-1-briannorris@chromium.org> <7ef2d283c35de47f6d2c38236d3d649e49a5eac2.camel@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7ef2d283c35de47f6d2c38236d3d649e49a5eac2.camel@intel.com> Subject: Re: [FFmpeg-devel] [PATCH] lavu/hwcontext_vaapi: Skip 'vgem' driver X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: "ffmpeg-devel@ffmpeg.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Mon, Dec 05, 2022 at 04:37:29AM +0000, Xiang, Haihao wrote: > On Wed, 2022-11-23 at 13:54 -0800, Brian Norris wrote: > > + } else if (!strncmp(info->name, "vgem", 4)) { > > The virtual GEM device is vgem, so better to use strcmp here. Good point, we probably shouldn't be matching "vgem-foo" driver here. And drmGetVersion() ensures info->name is 0-terminated, so we're not gaining any safety by providing bounds. I think I was needlessly matching libva-utils too closely, where they do the same strncmp(). v2 incoming. Brian _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".