Re: [PATCH] build: always set CONFIG_IPV6

2022-08-20 Thread Jo-Philipp Wich
Hi,

> [...]
> This patch sets the related CONFIG to always true and removes the
> config prompt, keeping the change minimal, and, should !CONFIG_IPV6 ever
> be fixed, easy to revert.
> 
> Signed-off-by: Thibaut VARĂˆNE 
Acked-by: Jo-Philipp Wich 



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] libubox: add missing NULL check

2022-08-20 Thread Hauke Mehrtens

On 6/22/22 20:58, Rosen Penev wrote:

strlen takes non NULL parameters. Found with GCC's -fanalyzer.

Signed-off-by: Rosen Penev 
---
  blobmsg.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/blobmsg.c b/blobmsg.c
index d87d607..bb6c469 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -364,6 +364,8 @@ blobmsg_add_string_buffer(struct blob_buf *buf)
int len, attrlen;
  
  	attr = blob_next(buf->head);

+   if (!attr)
+   return;
len = strlen(blobmsg_data(attr)) + 1;
  
  	attrlen = blob_raw_len(attr) + len;


This NULL check does not make much sense. The blob_next() function looks 
like this:


static inline struct blob_attr *
blob_next(const struct blob_attr *attr)
{
return (struct blob_attr *) ((char *) attr + blob_pad_len(attr));
}

It is very unlikely that this value gets NULL, we might check if 
buf->head is NULL, but I haven't looked into the rest of the code.


Hauke

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel