Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5047159rwl; Mon, 10 Apr 2023 22:56:35 -0700 (PDT) X-Google-Smtp-Source: AKy350Ya9rTTN4zqpyJrPhHuB7DIVBsjTW0h+zjdyjKT+snKnQO5CvbgJaO9eTJHGXyHGIgu1yZI X-Received: by 2002:a17:906:9f2a:b0:931:af6a:ad08 with SMTP id fy42-20020a1709069f2a00b00931af6aad08mr9751494ejc.57.1681192594932; Mon, 10 Apr 2023 22:56:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681192594; cv=none; d=google.com; s=arc-20160816; b=zSzvJ5tu17cZOCHqStHuIitXJ75LSqLBtIXmXG7xRwvF/I0VD51P7s2WF299+28Zxa QpQKqBZWpMpAuxuWQtPBby7EM3O7ZMDOiD+oRjtYiXPb7ykl+fnZwEUqQuW+CLjkU7tF +WKxKLiSa2VmCqFG8sF6p6uw6Gt9ZpYIyw7pIdTqR9846CR4vq8rukehCRF0XXK4iyb4 ++y9xA3UgjAwQA40PrIR/Y75brsw3EN6S4984N5BvLsEKfC/kUJaFqfNjgYBlNUYX2Js Sl2VKBccAYgVGcE9VfP+9UnF1L6kB4K8JhzNw09TehiapMjD1RyoRU3aE3N+eMxekasl RbPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=RHMG10ntLeYlRbI/eWA7wuZfKFUbLypz6+gPoLW2XTQ=; b=vpHTb4qmnqt32eIPaZGvMPjxd6X0WLScwlrhfBJxHnVVzx84ebhNuhAtiNwwAsthRP /DRnisqhiFnXls0ByGbFWY67QKiwQWuq0FTCXA6Si8n0vBp9AsgjjZDjxj1neQc74XOU pX8SmaGaS3oynyEAb/EgNcEHlA3ZWp85gqs39Ug+PB0NQ34LtOzWQ5/UKBOjsyFQlqsR KSjb9+XKAmR69E7eYiOVRABVctFPPsXRtQjdT3U0DEDilWiDZ76X3UH63/CU+ewJ+An9 Ax06KT6R+LGVQcs51Ellj4ucb+WYiueiohWXkLeVHZUth9l3oVrmmm/3DfRLgYKdMKwK PZkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=U7XnS+xV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb21-20020a1709071c9500b0094a941949bbsi3815960ejc.65.2023.04.10.22.56.08; Mon, 10 Apr 2023 22:56:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=U7XnS+xV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229974AbjDKFyd (ORCPT + 99 others); Tue, 11 Apr 2023 01:54:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229733AbjDKFyb (ORCPT ); Tue, 11 Apr 2023 01:54:31 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35560E76; Mon, 10 Apr 2023 22:54:25 -0700 (PDT) X-UUID: 4b77daa4d82d11eda9a90f0bb45854f4-20230411 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=RHMG10ntLeYlRbI/eWA7wuZfKFUbLypz6+gPoLW2XTQ=; b=U7XnS+xVz5eOMoxgL3l3ZXhPY09yaeSM1OAqFGZ9qdDKiTWzBdEcgf89IB36uu8+fdB4OJ/YJ0jMR770/qQOEjP4CP30o4g0JG8Lg/ifyoZQ+JgeI7ZTKvxk1Dz1LQM04+XFhvGNCBQkIo5ka63PiaMK09FjziEud3dE1Uuu+Bc=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.22,REQID:cb166d5d-e5cb-4af3-8050-1c9a141aa523,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:120426c,CLOUDID:1640eba0-8fcb-430b-954a-ba3f00fa94a5,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-UUID: 4b77daa4d82d11eda9a90f0bb45854f4-20230411 Received: from mtkmbs13n2.mediatek.inc [(172.21.101.108)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 675097890; Tue, 11 Apr 2023 13:54:16 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Tue, 11 Apr 2023 13:54:15 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Tue, 11 Apr 2023 13:54:15 +0800 From: Irui Wang To: Hans Verkuil , Mauro Carvalho Chehab , Matthias Brugger CC: , , , , , , Yunfei Dong , "Irui Wang" Subject: [PATCH v2, 0/2] fix coverity issues in encoder driver Date: Tue, 11 Apr 2023 13:54:11 +0800 Message-ID: <20230411055413.539-1-irui.wang@mediatek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org two coverity issues in encoder driver, submit two changes for fix them. changes compared with v1: - separate into two changes. --- Irui Wang (2): media: mediatek: vcodec: make sure array index is in valid range media: mediatek: vcodec: make sure pointer isn't NULL before used .../platform/mediatek/vcodec/mtk_vcodec_enc.c | 2 +- .../mediatek/vcodec/mtk_vcodec_enc_drv.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) -- 2.18.0