From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by mx.groups.io with SMTP id smtpd.web10.39911.1658232646669148933 for ; Tue, 19 Jul 2022 05:10:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oXyGn4n9; spf=pass (domain: gmail.com, ip: 209.85.208.178, mailfrom: savvamtr@gmail.com) Received: by mail-lj1-f178.google.com with SMTP id o12so17130912ljc.3 for ; Tue, 19 Jul 2022 05:10:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RV4XALbbzPnloF+23nRuMk9avQLZyjMITBi+UNuxsLg=; b=oXyGn4n979LJj7m1WTrzU2FXF8Zjsf4KYX4/RKcyRmnu/6OYiTjM3Ls3OAOAVWbHL1 oWgM5ucU644ESgIay09Alg2n4gavuEXEZxEPIZcn0z7B1VV8vVKMmXMprYhZt6Wbe9Fe JCFUN2DC2NERuQS1M59eQHW/J8vTJcNJBMgxZKMCeVW1iLUV91FBjPupFWmcTDtmx8CM PVeVIXCXEw66ZSmYKHj9/+A02S1g13+gwPmOPYPVHszjSN2svOJGNowgPqvkBqOJEgVP RU2bXIaUU8mgLvHB4GNYfsnhziqt6xWVYrgi7GrLjffeGIpJkD0JWNQPOe8S/+CmYpOC s5qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RV4XALbbzPnloF+23nRuMk9avQLZyjMITBi+UNuxsLg=; b=Mp5+XZP38qoS4IR+M6HCLda0xwj8yVItE+1XM3jNzy9U58v9JxgchsHI2d5Ic9Bx4M TzA7vVajsGCGulw6I/KFovstrhi57EQ3DP4+ZE2ObtY6l+vt0CZeN/Xs3vsZwVhstXcK Katgb3iNR5FfoesWxi2LRmEFEJkJxBkcou81bnWTqtTkmUnTUvTE5EX72qgHBTy7hSsO Y22sECp2P7CSOndgwRZNAYcWFQRtKZhflJRCzn1s2T5iGh1g6uh8cPjW73Xziebu9sz8 iqZ1p0NW72XUo2IDlkbCh4gHntX0NxX6vKtWOL/S6jR/NajOCniD0eVOgY9u52jdWrk9 18Kw== X-Gm-Message-State: AJIora/GzuEpbds8XGNXSq2bYRhQgaLRwtDq7Z6E/TcTtXaHwn+ZW7Q4 RNh6nXl4wuBUnCvwGOyLXcgxj5IOH9bqhbxRRgE= X-Google-Smtp-Source: AGRyM1uxVITCvi/XrhoOv7fzAPNdFrVkLsXHbt0q8FrmlDGzpnnfV1Njm4xL2QxpMHVBJ0D5aQeUQQ== X-Received: by 2002:a2e:ba15:0:b0:25d:67ca:873 with SMTP id p21-20020a2eba15000000b0025d67ca0873mr13959252lja.428.1658232644781; Tue, 19 Jul 2022 05:10:44 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([207.180.219.167]) by smtp.gmail.com with ESMTPSA id z20-20020a2eb534000000b0025d6ecbc897sm2668245ljm.46.2022.07.19.05.10.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jul 2022 05:10:44 -0700 (PDT) From: "Savva Mitrofanov" To: devel@edk2.groups.io Cc: =?UTF-8?q?Marvin=20H=C3=A4user?= , Pedro Falcato , Vitaly Cheptsov Subject: [edk2-platforms][PATCH 08/10] Ext4Pkg: Fix possible int overflow in Ext4ExtentsMapKeyCompare Date: Tue, 19 Jul 2022 18:10:14 +0600 Message-Id: <20220719121016.29380-9-savvamtr@gmail.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220719121016.29380-1-savvamtr@gmail.com> References: <20220719121016.29380-1-savvamtr@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Marvin H=C3=A4user Cc: Pedro Falcato Cc: Vitaly Cheptsov Signed-off-by: Savva Mitrofanov --- Features/Ext4Pkg/Ext4Dxe/Extents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Features/Ext4Pkg/Ext4Dxe/Extents.c b/Features/Ext4Pkg/Ext4Dxe/= Extents.c index c5951f78aa62..80427d869bd3 100644 --- a/Features/Ext4Pkg/Ext4Dxe/Extents.c +++ b/Features/Ext4Pkg/Ext4Dxe/Extents.c @@ -421,7 +421,7 @@ Ext4ExtentsMapKeyCompare ( Extent =3D UserStruct;=0D Block =3D (UINT32)(UINTN)StandaloneKey;=0D =0D - if ((Block >=3D Extent->ee_block) && (Block < Extent->ee_block + Ext4Get= ExtentLength (Extent))) {=0D + if ((Block >=3D Extent->ee_block) && (Block - Extent->ee_block < Ext4Get= ExtentLength (Extent))) {=0D return 0;=0D }=0D =0D --=20 2.37.0