From mboxrd@z Thu Jan 1 00:00:00 1970 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 C9A0CC433F5 for ; Mon, 25 Apr 2022 23:41:51 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 456EF83D9D; Tue, 26 Apr 2022 01:41:49 +0200 (CEST) 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="acqyrKRh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6A2D7807DF; Tue, 26 Apr 2022 01:41:46 +0200 (CEST) Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) (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 14A5C83DAC for ; Tue, 26 Apr 2022 01:41:41 +0200 (CEST) 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-qt1-x82e.google.com with SMTP id bz24so11517766qtb.2 for ; Mon, 25 Apr 2022 16:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:subject:message-id:mime-version:content-disposition; bh=HIPYpZgsNk+Wn1lKQo1jz6OOqGcqcCgDjJv0o+IQtyI=; b=acqyrKRhaf7olPMIGJcJTch0F22C7RZS7CCXmtK39Hfyghgmncy+EuKC6diKyAhmUI s8OT/hONJSD8zIxgGzYy3PIIAwVT9UkTdllOcqfSJuSNWpCbFLRIpFXNaMVM6AjdnB21 z2LklEnqXsWlBjBkXfUmzxREXnVTOzOPxylsA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=HIPYpZgsNk+Wn1lKQo1jz6OOqGcqcCgDjJv0o+IQtyI=; b=D0P/yWOhkXoy5V9nH0UHtF8O0M3Zdz1ykssCfRKgWAoCTk0yqtOudMYn2pvIxby7mb SSDmO+AmI73i0CfG/qT7i0bhADjI3ljYi4Ga5sP121qHU8Jh/y/sAsQH/BpmSvnk3KUz G7urtuPs99pU8VuBmyR1b2Rm4dYcmB77WlPrERgKZqIOCjdrC1LZaB+/wr4Nj/xkhZp0 CLP0EXPhlMg6IAtFoIYAXNLe4hVRpPN5TCOLvu+2qLwXycfwGGcSd2Hlcxpm/fsxQtDm QxbDsKcJrY2Go9ACKHzBhVbBHETiuc/F0cEzB35z5ROy7ci6caWoVG4ezq8TduZmZ/dK cxCA== X-Gm-Message-State: AOAM533quduPqCy5ouJhkKRt7Ir+3jKcHDNcStRzwrkaceayi32QY8V7 Af8dArXlCJY38E9kEdOUdyBqbabpG/Gz+g== X-Google-Smtp-Source: ABdhPJwHWO/gGCAzAj/z02+Kl9ZLwD8/dZDDwjskseCkvx5Bn3OqF9r0jcii6sjE41xzzrrU0SpQ+w== X-Received: by 2002:a05:622a:13cd:b0:2f3:6401:3101 with SMTP id p13-20020a05622a13cd00b002f364013101mr7706696qtk.450.1650930099501; Mon, 25 Apr 2022 16:41:39 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-fc46-9350-7cba-0174.res6.spectrum.com. [2603:6081:7b01:cbda:fc46:9350:7cba:174]) by smtp.gmail.com with ESMTPSA id m16-20020a05622a055000b002f35423f7c0sm6936068qtx.93.2022.04.25.16.41.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Apr 2022 16:41:38 -0700 (PDT) Date: Mon, 25 Apr 2022 19:41:36 -0400 From: Tom Rini To: u-boot@lists.denx.de Subject: [scan-admin@coverity.com: New Defects reported by Coverity Scan for Das U-Boot] Message-ID: <20220425234136.GH6644@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/QKKmeG/X/bPShih" Content-Disposition: inline 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.5 at phobos.denx.de X-Virus-Status: Clean --/QKKmeG/X/bPShih Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable ----- Forwarded message from scan-admin@coverity.com ----- Date: Mon, 25 Apr 2022 23:38:10 +0000 (UTC) =46rom: scan-admin@coverity.com To: tom.rini@gmail.com Subject: New Defects reported by Coverity Scan for Das U-Boot Hi, Please find the latest report on new defect(s) introduced to Das U-Boot fou= nd with Coverity Scan. 21 new defect(s) introduced to Das U-Boot found with Coverity Scan. 4 defect(s), reported by Coverity Scan earlier, were marked fixed in the re= cent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 20 of 21 defect(s) ** CID 352464: Memory - illegal accesses (NO_EFFECT) /scripts/dtc/pylibfdt/libfdt_wrap.c: 4291 in _wrap_fdt_property_data_set() ___________________________________________________________________________= _____________________________ *** CID 352464: Memory - illegal accesses (NO_EFFECT) /scripts/dtc/pylibfdt/libfdt_wrap.c: 4291 in _wrap_fdt_property_data_set() 4285 res2 =3D SWIG_AsCharArray(swig_obj[1], temp2, 0); 4286 if (!SWIG_IsOK(res2)) { 4287 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fdt_pr= operty_data_set" "', argument " "2"" of type '" "char [0]""'"); 4288 } 4289 arg2 =3D (char *)(temp2); 4290 if (arg2) memcpy(arg1->data,arg2,0*sizeof(char)); >>> CID 352464: Memory - illegal accesses (NO_EFFECT) >>> Calling "memset" with size 0: "memset(arg1->data, 0, 0UL)" does not= hing. 4291 else memset(arg1->data,0,0*sizeof(char)); 4292 resultobj =3D SWIG_Py_Void(); 4293 return resultobj; 4294 fail: 4295 return NULL; 4296 } ** CID 352463: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 4030 in _wrap_fdt_node_header_name_set= () ___________________________________________________________________________= _____________________________ *** CID 352463: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 4030 in _wrap_fdt_node_header_name_set= () 4024 res2 =3D SWIG_AsCharArray(swig_obj[1], temp2, 0); 4025 if (!SWIG_IsOK(res2)) { 4026 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fdt_no= de_header_name_set" "', argument " "2"" of type '" "char [0]""'"); 4027 } 4028 arg2 =3D (char *)(temp2); 4029 if (arg2) memcpy(arg1->name,arg2,0*sizeof(char)); >>> CID 352463: Control flow issues (DEADCODE) >>> Execution cannot reach this statement: "memset(arg1->name, 0, 0UL);= ". 4030 else memset(arg1->name,0,0*sizeof(char)); 4031 resultobj =3D SWIG_Py_Void(); 4032 return resultobj; 4033 fail: 4034 return NULL; 4035 } ** CID 352462: Insecure data handling (TAINTED_SCALAR) ___________________________________________________________________________= _____________________________ *** CID 352462: Insecure data handling (TAINTED_SCALAR) /drivers/gpio/gpio-uclass.c: 1203 in gpio_request_by_line_name() 1197 return ret; 1198 =20 1199 desc->dev =3D dev; 1200 desc->offset =3D ret; 1201 desc->flags =3D 0; 1202 =20 >>> CID 352462: Insecure data handling (TAINTED_SCALAR) >>> Passing tainted expression "desc->offset" to "dm_gpio_request", whi= ch uses it as an offset. 1203 ret =3D dm_gpio_request(desc, line_name); 1204 if (ret) { 1205 debug("%s: dm_gpio_requestf failed\n", __func__); 1206 return ret; 1207 } 1208 =20 ** CID 352461: Control flow issues (UNREACHABLE) /drivers/block/blk-uclass.c: 568 in blk_find_first() ___________________________________________________________________________= _____________________________ *** CID 352461: Control flow issues (UNREACHABLE) /drivers/block/blk-uclass.c: 568 in blk_find_first() 562 int blk_find_first(enum blk_flag_t flags, struct udevice **devp) 563 { 564 int ret; 565 =20 566 for (ret =3D uclass_find_first_device(UCLASS_BLK, devp); 567 *devp && !blk_flags_check(*devp, flags); >>> CID 352461: Control flow issues (UNREACHABLE) >>> Since the loop increment "ret =3D uclass_find_next_devi..." is unre= achable, the loop body will never execute more than once. 568 ret =3D uclass_find_next_device(devp)) 569 return 0; 570 =20 571 return -ENODEV; 572 } 573 =20 ** CID 352460: Memory - illegal accesses (RETURN_LOCAL) /drivers/clk/clk_scmi.c: 56 in scmi_clk_get_attibute() ___________________________________________________________________________= _____________________________ *** CID 352460: Memory - illegal accesses (RETURN_LOCAL) /drivers/clk/clk_scmi.c: 56 in scmi_clk_get_attibute() 50 int ret; 51 =20 52 ret =3D devm_scmi_process_msg(dev, &msg); 53 if (ret) 54 return ret; 55 =20 >>> CID 352460: Memory - illegal accesses (RETURN_LOCAL) >>> Returning, through "*name", the address of stack variable "out". 56 *name =3D out.clock_name; 57 =20 58 return 0; 59 } 60 =20 61 static int scmi_clk_gate(struct clk *clk, int enable) ** CID 352459: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 5877 in _wrap_fdt_get_name() ___________________________________________________________________________= _____________________________ *** CID 352459: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 5877 in _wrap_fdt_get_name() 5871 arg2 =3D (int)(val2); 5872 result =3D (char *)fdt_get_name((void const *)arg1,arg2,arg3); 5873 resultobj =3D SWIG_FromCharPtr((const char *)result); 5874 if (SWIG_IsTmpObj(res3)) { 5875 resultobj =3D SWIG_Python_AppendOutput(resultobj, SWIG_From_in= t((*arg3))); 5876 } else { >>> CID 352459: Control flow issues (DEADCODE) >>> Execution cannot reach the expression "new_flags" inside this state= ment: "new_flags =3D ((res3 >=3D 0 && ...". 5877 int new_flags =3D SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0= ) : 0 ; 5878 resultobj =3D SWIG_Python_AppendOutput(resultobj, SWIG_NewPoin= terObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); 5879 } 5880 return resultobj; 5881 fail: 5882 return NULL; ** CID 352458: Control flow issues (UNREACHABLE) /drivers/block/blk-uclass.c: 580 in blk_find_next() ___________________________________________________________________________= _____________________________ *** CID 352458: Control flow issues (UNREACHABLE) /drivers/block/blk-uclass.c: 580 in blk_find_next() 574 int blk_find_next(enum blk_flag_t flags, struct udevice **devp) 575 { 576 int ret; 577 =20 578 for (ret =3D uclass_find_next_device(devp); 579 *devp && !blk_flags_check(*devp, flags); >>> CID 352458: Control flow issues (UNREACHABLE) >>> Since the loop increment "ret =3D uclass_find_next_devi..." is unre= achable, the loop body will never execute more than once. 580 ret =3D uclass_find_next_device(devp)) 581 return 0; 582 =20 583 return -ENODEV; 584 } 585 =20 ** CID 352457: Null pointer dereferences (FORWARD_NULL) /drivers/net/phy/phy.c: 990 in fixed_phy_create() ___________________________________________________________________________= _____________________________ *** CID 352457: Null pointer dereferences (FORWARD_NULL) /drivers/net/phy/phy.c: 990 in fixed_phy_create() 984 } 985 =20 986 phydev =3D phy_device_create(NULL, 0, PHY_FIXED_ID, false); 987 if (phydev) 988 phydev->node =3D subnode; 989 =20 >>> CID 352457: Null pointer dereferences (FORWARD_NULL) >>> Dereferencing null pointer "phydev". 990 phydev->interface =3D ofnode_read_phy_mode(node); 991 =20 992 return phydev; 993 } 994 =20 995 static struct phy_device *phy_connect_fixed(struct mii_dev *bus, ** CID 352456: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 5996 in _wrap_fdt_get_property_by_offs= et() ___________________________________________________________________________= _____________________________ *** CID 352456: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 5996 in _wrap_fdt_get_property_by_offs= et() 5990 resultobj =3D SWIG_Python_AppendOutput(resultobj, buff); 5991 } 5992 } 5993 if (SWIG_IsTmpObj(res3)) { 5994 resultobj =3D SWIG_Python_AppendOutput(resultobj, SWIG_From_in= t((*arg3))); 5995 } else { >>> CID 352456: Control flow issues (DEADCODE) >>> Execution cannot reach the expression "new_flags" inside this state= ment: "new_flags =3D ((res3 >=3D 0 && ...". 5996 int new_flags =3D SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0= ) : 0 ; 5997 resultobj =3D SWIG_Python_AppendOutput(resultobj, SWIG_NewPoin= terObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); 5998 } 5999 return resultobj; 6000 fail: 6001 return NULL; ** CID 352455: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 6058 in _wrap_fdt_get_property() ___________________________________________________________________________= _____________________________ *** CID 352455: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 6058 in _wrap_fdt_get_property() 6052 resultobj =3D SWIG_Python_AppendOutput(resultobj, buff); 6053 } 6054 } 6055 if (SWIG_IsTmpObj(res4)) { 6056 resultobj =3D SWIG_Python_AppendOutput(resultobj, SWIG_From_in= t((*arg4))); 6057 } else { >>> CID 352455: Control flow issues (DEADCODE) >>> Execution cannot reach the expression "new_flags" inside this state= ment: "new_flags =3D ((res4 >=3D 0 && ...". 6058 int new_flags =3D SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0= ) : 0 ; 6059 resultobj =3D SWIG_Python_AppendOutput(resultobj, SWIG_NewPoin= terObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); 6060 } 6061 if (alloc3 =3D=3D SWIG_NEWOBJ) free((char*)buf3); 6062 return resultobj; 6063 fail: ** CID 352454: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 6239 in _wrap_fdt_getprop_w() ___________________________________________________________________________= _____________________________ *** CID 352454: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 6239 in _wrap_fdt_getprop_w() 6233 arg3 =3D (char *)(buf3); 6234 result =3D (void *)fdt_getprop_w(arg1,arg2,(char const *)arg3,ar= g4); 6235 resultobj =3D SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTY= PE_p_void, 0 | 0 ); 6236 if (SWIG_IsTmpObj(res4)) { 6237 resultobj =3D SWIG_Python_AppendOutput(resultobj, SWIG_From_in= t((*arg4))); 6238 } else { >>> CID 352454: Control flow issues (DEADCODE) >>> Execution cannot reach the expression "new_flags" inside this state= ment: "new_flags =3D ((res4 >=3D 0 && ...". 6239 int new_flags =3D SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0= ) : 0 ; 6240 resultobj =3D SWIG_Python_AppendOutput(resultobj, SWIG_NewPoin= terObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); 6241 } 6242 if (alloc3 =3D=3D SWIG_NEWOBJ) free((char*)buf3); 6243 return resultobj; 6244 fail: ** CID 352453: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 6122 in _wrap_fdt_get_property_w() ___________________________________________________________________________= _____________________________ *** CID 352453: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 6122 in _wrap_fdt_get_property_w() 6116 resultobj =3D SWIG_Python_AppendOutput(resultobj, buff); 6117 } 6118 } 6119 if (SWIG_IsTmpObj(res4)) { 6120 resultobj =3D SWIG_Python_AppendOutput(resultobj, SWIG_From_in= t((*arg4))); 6121 } else { >>> CID 352453: Control flow issues (DEADCODE) >>> Execution cannot reach the expression "new_flags" inside this state= ment: "new_flags =3D ((res4 >=3D 0 && ...". 6122 int new_flags =3D SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0= ) : 0 ; 6123 resultobj =3D SWIG_Python_AppendOutput(resultobj, SWIG_NewPoin= terObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); 6124 } 6125 if (alloc3 =3D=3D SWIG_NEWOBJ) free((char*)buf3); 6126 return resultobj; 6127 fail: ** CID 352452: Memory - corruptions (OVERRUN) /fs/erofs/fs.c: 151 in erofs_readdir() ___________________________________________________________________________= _____________________________ *** CID 352452: Memory - corruptions (OVERRUN) /fs/erofs/fs.c: 151 in erofs_readdir() 145 =20 146 de =3D (struct erofs_dirent *)(dirs->dblk + erofs_blkoff(pos)); 147 nameoff =3D le16_to_cpu(de->nameoff); 148 de_name =3D (char *)dirs->dblk + nameoff; 149 =20 150 /* the last dirent in the block? */ >>> CID 352452: Memory - corruptions (OVERRUN) >>> "de + 1" evaluates to an address that is at byte offset 4107 of an = array of 4096 bytes. 151 if (de + 1 >=3D (struct erofs_dirent *)(dirs->dblk + dirs->de_end)) 152 de_namelen =3D strnlen(de_name, dirs->maxsize - nameoff); 153 else 154 de_namelen =3D le16_to_cpu(de[1].nameoff) - nameoff; 155 =20 156 /* a corrupted entry is found */ ** CID 352451: Control flow issues (DEADCODE) /boot/bootflow.c: 226 in bootflow_check() ___________________________________________________________________________= _____________________________ *** CID 352451: Control flow issues (DEADCODE) /boot/bootflow.c: 226 in bootflow_check() 220 if (iter->flags & BOOTFLOWF_ALL) 221 return log_msg_ret("all", ret); 222 } 223 if (ret) 224 return log_msg_ret("check", ret); 225 =20 >>> CID 352451: Control flow issues (DEADCODE) >>> Execution cannot reach this statement: "return 0;". 226 return 0; 227 } 228 =20 229 int bootflow_scan_bootdev(struct udevice *dev, struct bootflow_iter= *iter, 230 int flags, struct bootflow *bflow) 231 { ** CID 352450: (TAINTED_SCALAR) ___________________________________________________________________________= _____________________________ *** CID 352450: (TAINTED_SCALAR) /net/eth_common.c: 129 in eth_set_current() 123 char *ethprime =3D env_get("ethprime"); 124 void *dev =3D NULL; 125 =20 126 if (ethprime) 127 dev =3D eth_get_dev_by_name(ethprime); 128 if (dev) >>> CID 352450: (TAINTED_SCALAR) >>> Passing tainted expression "*dev->priv_" to "eth_set_dev", which us= es it as an offset. 129 eth_set_dev(dev); 130 else 131 eth_set_dev(NULL); 132 } else { 133 eth_set_dev(eth_get_dev_by_name(act)); 134 } /net/eth_common.c: 129 in eth_set_current() 123 char *ethprime =3D env_get("ethprime"); 124 void *dev =3D NULL; 125 =20 126 if (ethprime) 127 dev =3D eth_get_dev_by_name(ethprime); 128 if (dev) >>> CID 352450: (TAINTED_SCALAR) >>> Passing tainted expression "*dev->parent_priv_" to "eth_set_dev", w= hich uses it as an offset. 129 eth_set_dev(dev); 130 else 131 eth_set_dev(NULL); 132 } else { 133 eth_set_dev(eth_get_dev_by_name(act)); 134 } /net/eth_common.c: 129 in eth_set_current() 123 char *ethprime =3D env_get("ethprime"); 124 void *dev =3D NULL; 125 =20 126 if (ethprime) 127 dev =3D eth_get_dev_by_name(ethprime); 128 if (dev) >>> CID 352450: (TAINTED_SCALAR) >>> Passing tainted expression "*dev->uclass_priv_" to "eth_set_dev", w= hich uses it as an offset. 129 eth_set_dev(dev); 130 else 131 eth_set_dev(NULL); 132 } else { 133 eth_set_dev(eth_get_dev_by_name(act)); 134 } ** CID 352449: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 5542 in _wrap_fdt_get_string() ___________________________________________________________________________= _____________________________ *** CID 352449: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 5542 in _wrap_fdt_get_string() 5536 arg2 =3D (int)(val2); 5537 result =3D (char *)fdt_get_string((void const *)arg1,arg2,arg3); 5538 resultobj =3D SWIG_FromCharPtr((const char *)result); 5539 if (SWIG_IsTmpObj(res3)) { 5540 resultobj =3D SWIG_Python_AppendOutput(resultobj, SWIG_From_in= t((*arg3))); 5541 } else { >>> CID 352449: Control flow issues (DEADCODE) >>> Execution cannot reach the expression "new_flags" inside this state= ment: "new_flags =3D ((res3 >=3D 0 && ...". 5542 int new_flags =3D SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0= ) : 0 ; 5543 resultobj =3D SWIG_Python_AppendOutput(resultobj, SWIG_NewPoin= terObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); 5544 } 5545 return resultobj; 5546 fail: 5547 return NULL; ** CID 352448: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 4291 in _wrap_fdt_property_data_set() ___________________________________________________________________________= _____________________________ *** CID 352448: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 4291 in _wrap_fdt_property_data_set() 4285 res2 =3D SWIG_AsCharArray(swig_obj[1], temp2, 0); 4286 if (!SWIG_IsOK(res2)) { 4287 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fdt_pr= operty_data_set" "', argument " "2"" of type '" "char [0]""'"); 4288 } 4289 arg2 =3D (char *)(temp2); 4290 if (arg2) memcpy(arg1->data,arg2,0*sizeof(char)); >>> CID 352448: Control flow issues (DEADCODE) >>> Execution cannot reach this statement: "memset(arg1->data, 0, 0UL);= ". 4291 else memset(arg1->data,0,0*sizeof(char)); 4292 resultobj =3D SWIG_Py_Void(); 4293 return resultobj; 4294 fail: 4295 return NULL; 4296 } ** CID 352447: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 6864 in _wrap_fdt_stringlist_get() ___________________________________________________________________________= _____________________________ *** CID 352447: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 6864 in _wrap_fdt_stringlist_get() 6858 arg4 =3D (int)(val4); 6859 result =3D (char *)fdt_stringlist_get((void const *)arg1,arg2,(c= har const *)arg3,arg4,arg5); 6860 resultobj =3D SWIG_FromCharPtr((const char *)result); 6861 if (SWIG_IsTmpObj(res5)) { 6862 resultobj =3D SWIG_Python_AppendOutput(resultobj, SWIG_From_in= t((*arg5))); 6863 } else { >>> CID 352447: Control flow issues (DEADCODE) >>> Execution cannot reach the expression "new_flags" inside this state= ment: "new_flags =3D ((res5 >=3D 0 && ...". 6864 int new_flags =3D SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0= ) : 0 ; 6865 resultobj =3D SWIG_Python_AppendOutput(resultobj, SWIG_NewPoin= terObj((void*)(arg5), SWIGTYPE_p_int, new_flags)); 6866 } 6867 if (alloc3 =3D=3D SWIG_NEWOBJ) free((char*)buf3); 6868 return resultobj; 6869 fail: ** CID 352446: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 6185 in _wrap_fdt_getprop() ___________________________________________________________________________= _____________________________ *** CID 352446: Control flow issues (DEADCODE) /scripts/dtc/pylibfdt/libfdt_wrap.c: 6185 in _wrap_fdt_getprop() 6179 resultobj =3D Py_BuildValue("s#", result, *arg4); 6180 #endif 6181 } 6182 if (SWIG_IsTmpObj(res4)) { 6183 resultobj =3D SWIG_Python_AppendOutput(resultobj, SWIG_From_in= t((*arg4))); 6184 } else { >>> CID 352446: Control flow issues (DEADCODE) >>> Execution cannot reach the expression "new_flags" inside this state= ment: "new_flags =3D ((res4 >=3D 0 && ...". 6185 int new_flags =3D SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0= ) : 0 ; 6186 resultobj =3D SWIG_Python_AppendOutput(resultobj, SWIG_NewPoin= terObj((void*)(arg4), SWIGTYPE_p_int, new_flags)); 6187 } 6188 if (alloc3 =3D=3D SWIG_NEWOBJ) free((char*)buf3); 6189 return resultobj; 6190 fail: ** CID 352445: Memory - illegal accesses (NO_EFFECT) /scripts/dtc/pylibfdt/libfdt_wrap.c: 4030 in _wrap_fdt_node_header_name_set= () ___________________________________________________________________________= _____________________________ *** CID 352445: Memory - illegal accesses (NO_EFFECT) /scripts/dtc/pylibfdt/libfdt_wrap.c: 4030 in _wrap_fdt_node_header_name_set= () 4024 res2 =3D SWIG_AsCharArray(swig_obj[1], temp2, 0); 4025 if (!SWIG_IsOK(res2)) { 4026 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fdt_no= de_header_name_set" "', argument " "2"" of type '" "char [0]""'"); 4027 } 4028 arg2 =3D (char *)(temp2); 4029 if (arg2) memcpy(arg1->name,arg2,0*sizeof(char)); >>> CID 352445: Memory - illegal accesses (NO_EFFECT) >>> Calling "memset" with size 0: "memset(arg1->name, 0, 0UL)" does not= hing. 4030 else memset(arg1->name,0,0*sizeof(char)); 4031 resultobj =3D SWIG_Py_Void(); 4032 return resultobj; 4033 fail: 4034 return NULL; 4035 } ___________________________________________________________________________= _____________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.n= et/ls/click?upn=3DHRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yoA22WlOQ-2By3= ieUvdbKmOyw68TMVT4Kip-2BBzfOGWXJ5yIiYplmPF9KAnKIja4Zd7tU-3DPkY8_EEm8SbLgSDs= aDZif-2Bv7ch8WqhKpLoKErHi4nXpwDNTszK3GDZ9otc8DV3LsnT3z-2F28zz8q5lyeH4hij-2F= 4stU6mHKHoiYMCCzT6sqvh0yjfRtFJBeQgBYEqn2q85ANfte0TE5DnZksPKtSgc-2ByzT03KaKr= NTAA8tRIAJ9D42pLh1urVtQBUaLcD6pi-2F4pw8lD32lkT0HLL97L6TKqmit1uQ-3D-3D To manage Coverity Scan email notifications for "tom.rini@gmail.com", cli= ck https://u15810271.ct.sendgrid.net/ls/click?upn=3DHRESupC-2F2Czv4BOaCWWCy= 7my0P0qcxCbhZ31OYv50yped04pjJnmXOsUBtKYNIXxWeIHzDeopm-2BEWQ6S6K-2FtUHv9ZTk8= qZbuzkkz9sa-2BJFwJpnH7TdCssKXId9ROfNiDuiUJRwNJQFpbHtj7ECbuia38O4wcdCAa38qtg= l2vIVc-3DMDdx_EEm8SbLgSDsaDZif-2Bv7ch8WqhKpLoKErHi4nXpwDNTszK3GDZ9otc8DV3Ls= nT3z-2FB7wXaOEj7Qci1j-2FZgcO8RxSEjMQGaVeLa-2BejYGjSjU5GtjJmbYXiBXZdcDueNljg= GGfbYLk7HuX6dpJHxlDbZVOhkuA1FuAUrWa39egd3Wsmt0lqPCa3QPGFEIPi6AFogH4XKCYOcjA= 8lBuD58N82g-3D-3D ----- End forwarded message ----- --=20 Tom --/QKKmeG/X/bPShih Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmJnMa0ACgkQFHw5/5Y0 tyyp5QwAqf66m7SKXinoObI4UkpeZ3Lh8aAUdxu5TV+A+A1esxi89xyihGSXJECE mmFxMXlBREPGToPeBw3MAjEdvoGWy/mE9mNKs5HRFVJF0xsP3o1pLQpdQ+lSRZKp h+twFTRYR0yRi06rubNmWxVWlYhbSrlOFKcw3tM475GW0h8upYvnmfb2vMCST6Ru pTQUyEIpt8ZpVPueesMIiTw7KIOuA9GJ9C5Fl22ynslt4h3y6zOK7Mm66s7JfLJr bdKnBEPmf7mGXs1MdRO/u2KRxSzzwKqs6Jd2iGw9i3ygpYPzHK10FwBWK7jueGaj aKQHxYXse3CUxvhfhzNw+YSFPwcF1A294js41SiZNiARtZ9owQagUbDZazBmy2b6 GxbZ8bGZlBbKgsL5x1n/nC6bwEtUOjsJka2nzzxmPt8fuWhN2GohoYSMIqafc+gG 1iGfXDhjjcLlkJIeMBFBNygyK7rddCHR2/JBKNfDGr0Ri+Ms6IPqCjD7lj5yFHdo cTeM9D7a =KHgH -----END PGP SIGNATURE----- --/QKKmeG/X/bPShih--