From patchwork Sun Nov 14 17:27:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1554901 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=Z7tdHkd7; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::23d; helo=mail-lj1-x23d.google.com; envelope-from=swupdate+bncbcxploxj6ikrbkuoywgamgqeieklfbi@googlegroups.com; receiver=) Received: from mail-lj1-x23d.google.com (mail-lj1-x23d.google.com [IPv6:2a00:1450:4864:20::23d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HsfRd1Dl5z9sX3 for ; Mon, 15 Nov 2021 04:28:13 +1100 (AEDT) Received: by mail-lj1-x23d.google.com with SMTP id k24-20020a2e9a58000000b00218c7914524sf4428740ljj.17 for ; Sun, 14 Nov 2021 09:28:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1636910890; cv=pass; d=google.com; s=arc-20160816; b=AeNNVMA5NxRgTMfD7hy9EdcwONH20i5KuWsBUt7FzxdCcT27JqIBbQj/ZySDJB29zN Tbo/IA6K2r3WsWRb+3iZ+d/R3E7Ft44KWrM9yjybXfVkYhADQPLJxIE1AY0aSxHvaQGe BEqApa02nnfb4RiuH/6/6EYjJZBuUz8EjJxfgVqTQZ9dT1P3eyhl4AcF1PbL153HPbZ3 zybdhhTlWN5yZ3luGQjohlJz5v+J9cs96Osc0W78gCGp3kRtsovU3RIJG41zlAXcLuXI KhUNlyQhBBMQ7sCLfpHY8Rbbwj4bFLNeb98AgTWtXuEnE9/nB/KRdewzabVlEUA9s8qm Etfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=0HZ67yBoNeR1nmW01+pgQLgS21MfJW9+u/LkTInZr2A=; b=kpmZaz0F8zDaCXxGfrWpF16k65TVtinLAsZHuJ81LRl6eMEkVSPmD4xL89Tq2gm2li fd7/aM2Vg9GRcw0lBenZwZgtKR+wVepsYxdkkGZEBiWnHCUroRQqGoq+b6Kfis8NeNXg 99nVlTm4nNbZcDxjtN/3uNvgCjXSrqAO6JA8O/hBUh3FJmdsJB9y++2XQ+XqVgYwD86C T4tffTvM4SMLcECkrZdvEcuKFDOON0W9ph6RAutz8hEsFiACnImAnErWhhGskMBFaV8P vIEe2//BkghjMmmiRM0XdnCalfVBGlHl6ZsVy0810SR9/p/YqyXwOIzGlLFm2UE5PHsj uAEg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=0HZ67yBoNeR1nmW01+pgQLgS21MfJW9+u/LkTInZr2A=; b=Z7tdHkd7C/qVl3pyy3wuCqEtyr4+O4WZWFefwyoZZ3lYToq1dMYfYcF+Nu9qb30aWU rxHDhjwnaDY7WCh5tkPLJwfkC/D6TQl89r/cbmZWCvwQ6pWF1ZA8BwlhYkZEPR2Ui8T/ DhZtaNmoXM6NhUmOd+bsnEG7tQNfRbjg8xr4n5OlCH4acEnqtvcXj6jgAW3E4cmvPBuV U0gOGEZ8CyEfieEbeHauwIhOGTCmTU8GMMOxqR5+DyYomBpNYpvbwMczpW4CsvnwvIsr 88Tf28bT+uuqEsf9mesyVQVLVku7ZcS1FYjNbe0kxBjks6DNmSOyZ+gFdi9aTYdqWcY0 04uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=0HZ67yBoNeR1nmW01+pgQLgS21MfJW9+u/LkTInZr2A=; b=31hyragm3ajCLtM0dhIR4xYakuj2F0eGZw1PvyI2pzYcGV/3xmj3YXo4oqqfDtiIdt WF7olA8MC05GtY9Go1e4FLvrWWITO4SF2uT4//jg/mxwkUJD8ymWkoJqEw9wZ6LWQ+KD uVCeHoyUMyQYN10zIDVebryUjMNL09PxcFVsme+Gn1EeJXc2ugiTFwiREG+2k9S3OlJd cBKeEpO42kfXLE52dENbAZlPD3PFuZiEmTrsso7kFnPK9SOKVipJkfKrXpKbRE9V1SkV sBFUrwP8uZS525uJq0ljbLc/T6JYyP/c+WZjbgToDFlv3VKS0J+mf6wSDNYBOt/bRDY6 tBLA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM532gmeQgDxtG122KjXf2yNxeFmkVVVFiUYwhWeiOna+KadgYsMGv IHYgV4aMHuP9JqSXp9/ste4= X-Google-Smtp-Source: ABdhPJyztadxXhcZfJ84tr+mypYxT0QLqjceCxrH51o7XcIUcuvGDBog88Yaj8/odQe163jiUBq81Q== X-Received: by 2002:a2e:3a18:: with SMTP id h24mr33239087lja.372.1636910890223; Sun, 14 Nov 2021 09:28:10 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:a7c4:: with SMTP id x4ls1493534ljp.8.gmail; Sun, 14 Nov 2021 09:28:09 -0800 (PST) X-Received: by 2002:a2e:86da:: with SMTP id n26mr32617070ljj.522.1636910889393; Sun, 14 Nov 2021 09:28:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636910889; cv=none; d=google.com; s=arc-20160816; b=YGFpqXpF36GC5Ud+SLGuic/Q7n18M6R8QcsuyGdT0cYdmBvMDgnZeUC3UKmsOAQG2L P8rUZhHZZwCCsJib+rdEcGS85mQZujCaviSMsb6OVUHUBNToQGztEjCJrI1+Q2sn0K/S 8lDrWhiYCE5+SuwCnRpaNXK8l1TjtUC/SPYiR3fLxS5WdTaOrr9PfWcvnFCI9TtS0jTk G9VQGiMNrvWB/0gyaPSR2vW25cJYj7xJvtbVHFyMODWNaN0edLNpmGdcFu+RsF1HIVtG h6004OzfkFnrqV11vokbLeDKnpSOguuSwjCJ8DoyRihAfx4Y1HxMU0EL2IdMe5LhjTDy Vogw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=Gbqj71V4ncdH9gPEuDIpYlod4Kh4wCiMtkDv/9hChSU=; b=R9k3sdcBKGMH0IDzq4kfaC76NtUC+uixgiMPzLPLdLuUA198nxajON5xzqTvDZZKb6 RHWAcA6yl4rPfNnz1G7+PkwqW66JlQdsQZ98KRDHgFOAEcOR/OnhlFxHXMoK3eC5Zz68 7WWCeTWN6Ty8c3XLbZihBs0kLO+7Ub7Q79MJb+Ahcq7V7OwxPC76widj8VmtqErYT9Wg t+O+9BEyvfFsN5f4cnr7Y8iq68pjZS89GGilSlBc54tMtdl+OTZY9iWFVg9XkCAz37ZX rlOwQbKRBnnCM2FPODKHpPPEogq7Tmm7Q+VpvjgKe4G05jSMtcK4I7YIUAAwwtnSK7f0 wlyQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id t71si717309lff.6.2021.11.14.09.28.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Nov 2021 09:28:09 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4HsfRX6fDNz1qwdZ; Sun, 14 Nov 2021 18:28:08 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4HsfRX6Wcsz1qqkB; Sun, 14 Nov 2021 18:28:08 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id UlTUpAp36XjS; Sun, 14 Nov 2021 18:28:08 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Sun, 14 Nov 2021 18:28:08 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 6779E4540853; Sun, 14 Nov 2021 18:28:04 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id Wjmx0I2UEkWe; Sun, 14 Nov 2021 18:28:01 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id 6FC1345426D9; Sun, 14 Nov 2021 18:27:45 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH V2 10/36] Check return from malloc in multiparser library Date: Sun, 14 Nov 2021 18:27:07 +0100 Message-Id: <20211114172733.71602-11-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211114172733.71602-1-sbabic@denx.de> References: <20211114172733.71602-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Multiparser staruc created in the initialization is not checked for error. Signed-off-by: Stefano Babic --- corelib/multipart_parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/corelib/multipart_parser.c b/corelib/multipart_parser.c index 982e853..c6e0530 100644 --- a/corelib/multipart_parser.c +++ b/corelib/multipart_parser.c @@ -84,6 +84,8 @@ multipart_parser* multipart_parser_init strlen(boundary) + strlen(boundary) + 9); + if (!p) + return NULL; strcpy(p->multipart_boundary, boundary); p->boundary_length = strlen(boundary);