Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C1DE4C4332F for ; Thu, 8 Dec 2022 20:23:37 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5BC138516C; Thu, 8 Dec 2022 21:23:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="o8tsc4hl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 725EC85006; Thu, 8 Dec 2022 21:23:22 +0100 (CET) Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 24F2082A12 for ; Thu, 8 Dec 2022 21:23:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-wm1-x32b.google.com with SMTP id m19so2088527wms.5 for ; Thu, 08 Dec 2022 12:23:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; 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=wkd9dqWkjBcah3lb+3WW3rAZYAyy3LNB0AOTz73hKV0=; b=o8tsc4hl0GevPKVc0hOvPGeLahx/tegRmreH87Jo80lic32wOJP5wRerqPLndYopwc yy5eOzmNwS6gUCLa22wei/x9zOegvdKN9qu+U8UUAwI8RIhLcoE/NqmffBEfZukx8Fic fOouvbV5tXJlbhOiTQPQ1OQ6Q5yUi2f0DZmv0= 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=wkd9dqWkjBcah3lb+3WW3rAZYAyy3LNB0AOTz73hKV0=; b=4/LaaWUVW6o9M3yozPCLMCq0tv2t9AaSWiTJsewDGMd40udRSh3wGu4Ka66TH24Al0 /kOVPMmwkRuBPNHVVa1DooLSjUoSS+qAckh1a3BLouaQdexMAZMoJAYLD8oLmUlCsx1j Uc9MOo+l7OrxDYw7BNaFXnDGj3PM54kI7z1VjK/SUq5FgVmpxHjeZFSiAjBfPXEcjJ7Q d4/vnVrZCiRmUV2fE8jv0zqf0WmX6iL/iZcu6lLKdOc2Kr5QEt/fkr6Py0k+WTogOZb7 DVKQDTfQurYdBLwL5OsvCpldf1yIJqdc81SwvrMksxnv5RVt/t5reAku/RrzFb5y9VZi YZxQ== X-Gm-Message-State: ANoB5pnLW7wLWPCeDU04aib9GFhKf8knCAMv2298YnxviVg9BiEiIq4Z GpSGbcb4iEO9/V1YJZ6nUf+cPQ== X-Google-Smtp-Source: AA0mqf4gRKtQ0+DLDRtn8Uav6tH4V09SryP5spDJ2RS6+2J4UmivzHn0lvy+SnHDLnaUb0LQ3c7QrA== X-Received: by 2002:a05:600c:3493:b0:3c6:e63d:b8a1 with SMTP id a19-20020a05600c349300b003c6e63db8a1mr2753900wmq.16.1670530997929; Thu, 08 Dec 2022 12:23:17 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-0511-db36-5a97-af74.res6.spectrum.com. [2603:6081:7b00:6400:511:db36:5a97:af74]) by smtp.gmail.com with ESMTPSA id t15-20020a7bc3cf000000b003a3170a7af9sm5901698wmj.4.2022.12.08.12.23.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 12:23:17 -0800 (PST) Date: Thu, 8 Dec 2022 15:23:14 -0500 From: Tom Rini To: Mikhail Ilin Cc: u-boot@lists.denx.de Subject: Re: [PATCH v2020.01] tool: ifwitool: The function localtime() can return NULL. Message-ID: <20221208202314.GF3787616@bill-the-cat> References: <20221118085002.21577-1-ilin.mikhail.ol@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="mzt02ry+7iOvf8rs" Content-Disposition: inline In-Reply-To: <20221118085002.21577-1-ilin.mikhail.ol@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --mzt02ry+7iOvf8rs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 18, 2022 at 11:50:02AM +0300, Mikhail Ilin wrote: > This will cause the local_time pointer is passed as the 4th argument=20 > to function strftime() to also point to NULL. This result in a > segmentation fault. Thus, it's necessary to add a check of the local_time > pointer to NULL. >=20 > Found by Linux Verification Center (linuxtesting.org) with SVACE. >=20 > Signed-off-by: Mikhail Ilin > Reviewed-by: Simon Glass Applied to u-boot/next, thanks! --=20 Tom --mzt02ry+7iOvf8rs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmOSR7IACgkQFHw5/5Y0 tyy0Bgv/aUOtgraxI8I4yT7ulXOPgTjznwnpUtxgYtDUbMuFKx8MaP67mc7JvA+/ kCbHaccA7fydnE/sQ5dlHvOkyRP9aswqeX339Eh+q9l1Y8KXGpc9hzaiWEjeh5P7 ZHpWkZTXOQB0Lua1Xs8s9hRC83PtTrxtUvusOlPRnUmkMLvmjkYG/VgHBCsRVzJ3 e6mqaeijxp7/XXXEfO8cClr7iBlkSFa0G7YkgiemnpookkaoXCHx+tKocSlNXxK1 Lxa8pHjgDr+Aq8bYz9g02TBhT5iGDq1B1IhC0kdMy4e51AdyQSpGcNOMiTBi35yl CkbGUtxg3ZSmwdHrgbruZY7pjkG0hcAK2ARe/0eGYXr5K/7pRWXa8Y9TiNP25V60 qDTXEK0pp4j5HQMgQZc5LOiNpSKCEqdi9VWm8ZxExQiekV7NWrrnGH24Ubwihy/e TuGiD5oJGYPLT9gc1PrZtCz8lOMF9z2Ux5jbMIJTkSrfHfXfrmDVHq4I1jdx3E+o rcZ8LLfZ =cXPi -----END PGP SIGNATURE----- --mzt02ry+7iOvf8rs--