Question about ancient TARGET_CFLAGS in rules.mk?

Jo-Philipp Wich jo at mein.io
Sat Jul 23 14:41:24 PDT 2022


Hi,

> I mean I know they are gigantic corner case where you can build an entire 
> house in the corner... But what are the drawbacks of such small fix? The 
> NULL check one for example seems pretty important...

Adding that null check there seems redundant, any code path that could lead to
blob_next() returning `NULL` would've already crashed due to a null pointer
dereference in blob_len(), invoked through blob_raw_len() and blob_pad_len()
by blob_next().

So adding this check will solve nothing apart from silencing a random warning,
without actually fixing any potential problem. It might even create the
incorrect impression that a possible NULL pointer situation is handled /
that blobmsg_add_string_buffer() is NULL-safe, while it actually is not.


~ Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20220723/cc13e8aa/attachment.sig>


More information about the openwrt-devel mailing list