Message ID | 20240415101906.45782-1-stefano.babic@swupdate.org |
---|---|
State | Accepted |
Delegated to: | Stefano Babic |
Headers | show
Return-Path: <swupdate+bncBCBOLPPCVAMRBHX66OYAMGQEMLNF2JA@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=F1E7VyLS; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::438; helo=mail-wr1-x438.google.com; envelope-from=swupdate+bncbcbolppcvamrbhx66oyamgqemlnf2ja@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-wr1-x438.google.com (mail-wr1-x438.google.com [IPv6:2a00:1450:4864:20::438]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VJ37C2dLZz1yY4 for <incoming@patchwork.ozlabs.org>; Mon, 15 Apr 2024 20:19:17 +1000 (AEST) Received: by mail-wr1-x438.google.com with SMTP id ffacd0b85a97d-343ee8b13aesf2581588f8f.2 for <incoming@patchwork.ozlabs.org>; Mon, 15 Apr 2024 03:19:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713176352; cv=pass; d=google.com; s=arc-20160816; b=P4fL7vxpY/vPBsH1rlzdKPPQlltVJfVe9CHputwSmLrkis5przhx+a1UfHX2OGbVw5 uYfpJs0mNCcsT08qNCrotwUsgYbwoI2L9CSxNa4vnNps88yDFZX89fc/hjuXRnKWqvPw AfL8yfLkYenkJBLd/AHawFMVvL7tYPgtPedc090hwvIxVHqkLOZSBxbouaYGJ46bWZnw GV57wIDLlSBJE+Bd/zA3vAMlo8og/M8KKh+yAwKKQTOyfZ8tzc0AeOrn3hX9JGOQ4Pcd 32UfWH9BwTYzXY94FKKbk8NxmZgSrd/lZf9WwG7TkUbTgucm5J5DVUjl11SXZ2kcow/I 7q/Q== 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:ui-outboundreport:mime-version :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=PFtSRfRFpc0Rttz7Jxhb26Td36tY4DjVQVPQvhRhTPw=; fh=Si11CMOgnnHzaMFBEsebOBbSvRSSP1EOGz7ulHJsu/k=; b=ckMg3Sy5bNBbIzaC8fsupkG5YBW7cDyLPHPfIS9Ia9Ndj0iqeGdJnTZleVFnrQy9nO WFNW/7Fgjy6UFqLRC+kzDQYedFpVSYsvA9g56SV82ilTvTggGCPcvAgoCGiO54w7J4/m E5Eornqm54sLpgX/Qg3QXPAjl8f9P0T+2bBPHu31w40/9ct57NyoCEclmqzfzFjjN8DV tdldoueNuLFTQI7yuXNmEkG9IFjLLma8N8UO4CMUfpxNL2zSBCy0V710gwTl4qBCxJaI Hm+pa0HREQ8fAYR/hP8ajcw2M7KkssVkfmDwWHEMkOVhNtCnSv6qtLqTYkaJ8cydG63j wAIg==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=FEWjyrvc; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 217.72.192.75 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1713176352; x=1713781152; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:ui-outboundreport:mime-version:message-id:date :subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=PFtSRfRFpc0Rttz7Jxhb26Td36tY4DjVQVPQvhRhTPw=; b=F1E7VyLS8LchzjirY0trlgL/vA221eQ9JhenU3bDFBDL7zZmOgu6o4RI7u4ZL8vyO0 1gkcIIVWOqItKB7U5v/LJjGjqJyaISualw4XEaCH89kK9rif2SfSclr73T8t35xv/VtI ISFOhfVE9Dldpqmc7nccN1KsPyK5iBPPd7L8CVjK/bjtPMd6ERd7z3f9UXuJAaj5bPxn 4Kjd44pxGJdZ+JAN4ASXYW0CfN7LB+5a+wjEeJWa9rDG1ymvm+xRrqmAblpjFUqcDci0 mNFYw4xxzwodHt02yGao1VZi6tv1K16PgHDn2VSN0dozTIW2Sb1h5o9h4dvx3twzpjQk gRqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713176352; x=1713781152; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :ui-outboundreport:mime-version:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=PFtSRfRFpc0Rttz7Jxhb26Td36tY4DjVQVPQvhRhTPw=; b=SQAgJqLnKkNdNh6usWJ9iNOcNvPB9WQZRqphwJ6r5aZePj1NU3I9DjnrchDHaFFEC9 nNd++uUo4vr+K5XMptvUm33a577P3wxFenCR8pamDqsO0Eg+dX/y9eUD2gVub0NSC0/d KEn1EERJydMx13uUEQB7lUIl0KKcaR9WT0/+nyJ9gZRI18Pl3wH95fZzGEzOrqkKdzq5 78nP70w9SimERKYTR3zDwCFm8PgiEduqsaFQMveatleIeuxnj7IZ8208rE/Qp0VCc4N5 LEalzgm0KDNkuoa+RsdvrraL+2UIi4trp7ZfUW4OJ5Hq7vc2ifNqu7U6g6dg8sXwO+lp taog== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCVSObxFNAeZmeQ1HXwx8GnZ02VZiAHYXVTpnp7/zcH/+9vJNr1mnFWMo/Ur9Pv/PQYk3IyW3O1nR1DwBagfD55eM+y0JycSfOzv/uzfTQ== X-Gm-Message-State: AOJu0YzyzNT+a7pjAwUue/A2CtWb/Rd09UxkAfUjJqaR5NDT9OxC/S/d MQz83969obEE5U5PtJF2YqlU1fa/Hk6Itgk8wZ78DNzjew/yQiqw X-Google-Smtp-Source: AGHT+IH9Xo/9YnrPxyD5lrhSfCwLc3KaZLbgoGw6HVjZep3KFp3htbKDvXyFZXpB33tGmN0btq37ng== X-Received: by 2002:a5d:42c2:0:b0:33e:ca3a:1bba with SMTP id t2-20020a5d42c2000000b0033eca3a1bbamr7634674wrr.20.1713176351620; Mon, 15 Apr 2024 03:19:11 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a5d:464b:0:b0:347:37f3:a087 with SMTP id j11-20020a5d464b000000b0034737f3a087ls1243886wrs.0.-pod-prod-05-eu; Mon, 15 Apr 2024 03:19:09 -0700 (PDT) X-Received: by 2002:a05:600c:3847:b0:418:4e4e:2847 with SMTP id s7-20020a05600c384700b004184e4e2847mr3072326wmr.14.1713176349341; Mon, 15 Apr 2024 03:19:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713176349; cv=none; d=google.com; s=arc-20160816; b=gDbicNIvDt3WhFaFINAXySF3L0cIEPZlx4i3hJr7mThG/h1UlW/avInXMr0c40nnqz r1QhSnbmXY4WSZ+B0RASK+41CwRAumpYYvW5O1Y37+zfuqgRvWr227eKhegPkkijLI26 l8doBcl2VgPHuoeZLXJHulahJIXeRDj4D3VquotJNHCDzOcamOH1Z0tqovm4CHLWWdlN fd+JwxrgcJR6gl2uv7+LZhW6e8JA6jQYfJJJPbB2doOwFfIhtDOaMH797kZccPeShrv/ 9T+1k1qnp7pqKvv7acytvK1wO7aAK282uu9J9Te+KZ+xjrbJ1Z3PT4+5MuhLlssblK8Q ThoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:mime-version:message-id :date:subject:cc:to:from:dkim-signature; bh=M1obE3kAdR2QQxgXoWpBhjwm4EuDXVX6BEUQ2HPJflI=; fh=TiEWcqMcKpHk5s7uErzpntoONrNfOXwKpI5P8bIlggk=; b=ZmB/m9G4CIZtqWceEoWs0ZQrtVaMu2oBMkKYZjcFQNLtXrtoPx+T69xuyuGc5by0uP yUqcE+8ac0I7s0+cQkD3sQcohX5zUIWdTwukMigdHSCTN8ZdSioWcCPV+dCxY6oIYNi3 k4qmjVSv9tyNgkuaQw/RZju+LteAU0UPC1McWV17RkgIjzZFKNs5spKXnS6bCON9BvmO TgvYT7MikXwADxY3ZMIhuZRsNB5XthEaWpqCXcoAPORXLTiZMy8beLSNRTv/bbCdeEXs YuwI2e1wjrXI8kAtFsC+wspHpTEg2wEWIZe+klVPXHI1YVmQtQXLrn4wO9+pfJcpgGO6 1FZw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=FEWjyrvc; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 217.72.192.75 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org Received: from mout.kundenserver.de (mout.kundenserver.de. [217.72.192.75]) by gmr-mx.google.com with ESMTPS id y20-20020a7bcd94000000b0041682cc5beasi330009wmj.2.2024.04.15.03.19.09 for <swupdate@googlegroups.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 03:19:09 -0700 (PDT) Received-SPF: pass (google.com: domain of stefano.babic@swupdate.org designates 217.72.192.75 as permitted sender) client-ip=217.72.192.75; X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6 Received: from paperino.fritz.box ([88.217.136.221]) by mrelayeu.kundenserver.de (mreue106 [213.165.67.113]) with ESMTPSA (Nemesis) id 1M1qbm-1ru6VA38bA-002Gwi; Mon, 15 Apr 2024 12:19:08 +0200 From: Stefano Babic <stefano.babic@swupdate.org> To: swupdate@googlegroups.com Cc: Stefano Babic <stefano.babic@swupdate.org> Subject: [swupdate] [PATCH 1/3] BUG: hawkbit: check if details are sent via IPC Date: Mon, 15 Apr 2024 12:19:04 +0200 Message-Id: <20240415101906.45782-1-stefano.babic@swupdate.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:ENipS4tvH2O9RwjuQJd1Zy59lk8rz/7yg3yYj4P9qSu/8OcSYix 0Y6nZxZgvopR4tahztk+F/VF5wWx9us98o9xkbyz7kNPT5V3tL+T8L0g6457n7x/TjjqpA7 tRzKW0rNWCy61yt7QYTRVXagnTTFtQYYQ2FbnI/BUggah0Rg/hHTbXqaR2+yeGkYY289Yso y3DTjB/Qgm4fYy0Nqqvhg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:q4yJcJItjug=;+1gLhvhms1Yo73S4xSn04K+fH+w 3vI16DdtvtUDe/iGTAyNl4+sq9O2hnGCHIHDKd4K5SA4VaXzo3y8JPGn91zu3mLdNRFXEUtOr NZbzqbzS3QqjErZkgKTlb0tT/N4aprfzLISOYq9dSDVJjh7UPHObzDgDXzoFCHIlXioLimVz2 sVNCJUdtUbh2nSJqRL+KYandggJ/Z6m3SIgS7t4vQBWxLq6+rZ1WpWIZ9W+mKpNLvlWfJ00HM S5Kry+MbykUQ/azPMBPBdVz+rlR4M9TLPlGON7uXyTO3FD3BdlDmXK1JlRNDbjj9mSRzPNmAY NZoM4sFMqEPeDBHNjvoh+WPC574x7ROH9YBPz5kKJqRTmAs8+UtSggUyIfo1cAN4BD5xU46k7 ZaXN6qN8IX5+g7fnhdKmPOg3SmDc//FDmtEw05UCj+HF9iKHsQLMR8DEpsjxu1LhDTtViRTwF uC8E3qM0oi5EqwknkRAcsr/XeVg5HQ/METBtlqSEl/Y7DOtg33BMdB53IthdAn5EwZL4HzBXP BWrvklspTgmfSZ4g3JIZgQvdzaGj/PN4/6j0M17sKL8n9mN0yUuXjvQif25th9beQ7+s7KvpZ 8I5Md1jspdIlPHt7eZMGZ4DM004f+O6s6eHSkWpuqW0pc8M+ZRUaBcDACkZzbOPbq5CKFBAAK WJpS7FkAqGonwcJi85XmaYjkLQC2sWMNWADXuIy68ZoD5U+MJxdgKIbhZDCYwCyXb9GLz+cFO EPrMaMQrpLkJEG73skBTMZKUhRyBNp4u9rGctYqkyh8I9XDS0+aSQk= X-Original-Sender: stefano.babic@swupdate.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=FEWjyrvc; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 217.72.192.75 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
[1/3] BUG: hawkbit: check if details are sent via IPC
|
expand
|
diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c index 7ceb1dc0..f1948c68 100644 --- a/suricatta/server_hawkbit.c +++ b/suricatta/server_hawkbit.c @@ -2054,6 +2054,10 @@ static server_op_res_t server_activation_ipc(ipc_message *msg) return SERVER_EERR; } + if (!json_data) { + ERROR("No details are passed, they are mandatory."); + return SERVER_EERR; + } int numdetails = json_object_array_length(json_data); const char **details = (const char **)malloc((numdetails + 1) * (sizeof (char *))); if(!details)
SWUpdate stops after assert() fails if details are missing. All fields are mandatory, so check that even details are sent. If not required, a dummy string should be sent. Signed-off-by: Stefano Babic <stefano.babic@swupdate.org> --- suricatta/server_hawkbit.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.34.1