| Message ID | 20260403140523.1998228-2-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775225150; bh=nteHJXwoRdhLLoItsHnGNFMKJ6Xi5IhnwlTOSWPiavI=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=VaRsYomIFBmB5or991PZwZjquMh8BdHvhKh2evxWhXvifBAOTlwEZuJc+7pwF4pzX mPt7NHGFfT0cAeGom81iTjlL8OaUlgWYYqMO3nB3CiOMYVJQRcBeE2hyvR7pY78dub 5ifxf/t9OQ6IU/jZSw4sR2A9ZHnaLUhh/MK2o+GAz7R2Kllng3oev8uPJN9XaDDHaX IV7cL7VcHCTtkUw6Ggslfz3UUcvc4FngRABhgIxBRlZTgWgHAwwDtxPw1ZEooiw1cF l45Oo2c3ubngw1zIpW0+oDWk3Xj1xmEPeJhLPY+bod0IgW6WuEHgFlc/afTbCniH5Z b38MdYPNWHlqg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BB0986A34F for <u-boot-concept@u-boot.org>; Fri, 3 Apr 2026 08:05:50 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id iM33afcKojag for <u-boot-concept@u-boot.org>; Fri, 3 Apr 2026 08:05:50 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775225150; bh=nteHJXwoRdhLLoItsHnGNFMKJ6Xi5IhnwlTOSWPiavI=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=VaRsYomIFBmB5or991PZwZjquMh8BdHvhKh2evxWhXvifBAOTlwEZuJc+7pwF4pzX mPt7NHGFfT0cAeGom81iTjlL8OaUlgWYYqMO3nB3CiOMYVJQRcBeE2hyvR7pY78dub 5ifxf/t9OQ6IU/jZSw4sR2A9ZHnaLUhh/MK2o+GAz7R2Kllng3oev8uPJN9XaDDHaX IV7cL7VcHCTtkUw6Ggslfz3UUcvc4FngRABhgIxBRlZTgWgHAwwDtxPw1ZEooiw1cF l45Oo2c3ubngw1zIpW0+oDWk3Xj1xmEPeJhLPY+bod0IgW6WuEHgFlc/afTbCniH5Z b38MdYPNWHlqg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AB1376A34C for <u-boot-concept@u-boot.org>; Fri, 3 Apr 2026 08:05:50 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775225148; bh=PJhQlGAdpjkZfyiUvW/O5yjg5yIAOweCdTfHLB2W+Xg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VdvvHHHD1Hnfr4SGvqPXWKwRwucJzYbc9r4jQ+jsqaJdaK6ilLi6TpfgF7nb7iW3R OV+VzxIpA075zdcn+j9CTHs/DIVH61X6Wmij9/itAl7L2v1waMHLjGn8aLaM3DIkh0 iAtMKJTF8D8D3VRcxNjcA9bQ2si61Sp1Ac1jH7hsdlmBd2ZSHwXIsafz8uhkc4NPQm e3/v3mgLfiA0H5BHLAyxDy6s4+fKtiLzYQECvZ4nTXg0siuZZRS88MTZKma39gLqBn GRIMq8L7P/UPM7YK3NhnEPnSQ0GiU4L41NhcwMCs5xzvUMfgKCN4nVd3Ob37p4bFHM HUTSA62ho0Glg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9900C6A34E; Fri, 3 Apr 2026 08:05:48 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id D2K5VQdP3rSf; Fri, 3 Apr 2026 08:05:48 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775225143; bh=4H7S0xXl91Mu6Esi4XQjQ2Dfp+lks0jAB180CkGGAdo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RJliIuEChCTIyZRlD5PdOy9ZajfgObSLsITvDxHB6YXJ8qmAP2ptG/mVl+ElWoYpO io3InQbAPcq/f/l4/j/1BQEZsT76rnEiPrIcH7FyXil5xx38g+VF+PafIfJ6d+UByy P989OXvbP/10n+g0s12oIIgCDZ7Al54vTMFerLquAHeM9jmSe/3FHxiagNBm0bIbaN pk+fcxTmvqLCZ0j46vanGNURBWh9gZW0qRFIHVL5bQfoymDNB4q/DawkkNrCgrQ2tO hpdvVxmP3Dy6lz9+nQWxP2CSqTwRrxaxg7NeoYdH0oVhj0Yx8qDHjYEr7cf3t/d4PC bcSQfwG4F0GZw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 5E32F67EE6; Fri, 3 Apr 2026 08:05:43 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Fri, 3 Apr 2026 08:04:23 -0600 Message-ID: <20260403140523.1998228-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260403140523.1998228-1-sjg@u-boot.org> References: <20260403140523.1998228-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: FDLEYLQ4TVN2FHZ5VIGYF5MIAPB5W674 X-Message-ID-Hash: FDLEYLQ4TVN2FHZ5VIGYF5MIAPB5W674 X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass <sjg@chromium.org> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 01/34] vfs: Fix NULL check after strdup() in dir_add_probe() List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/FDLEYLQ4TVN2FHZ5VIGYF5MIAPB5W674/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
Add a virtual filesystem (VFS) layer to U-Boot
|
|
Commit Message
Simon Glass
April 3, 2026, 2:04 p.m. UTC
From: Simon Glass <sjg@chromium.org> The NULL check after strdup(path) tests the wrong variable (str instead of dup_path), so a failed allocation is not caught. Signed-off-by: Simon Glass <sjg@chromium.org> --- fs/dir-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dir-uclass.c b/fs/dir-uclass.c index c5d7ef45d3b..0b55713cbdc 100644 --- a/fs/dir-uclass.c +++ b/fs/dir-uclass.c @@ -27,7 +27,7 @@ int dir_add_probe(struct udevice *fsdev, struct driver *drv, const char *path, if (!str) goto no_dev_name; dup_path = strdup(path); - if (!str) + if (!dup_path) goto no_dev_path; ret = device_bind_with_driver_data(fsdev, drv, str, 0 /* data */,