Question about ancient TARGET_CFLAGS in

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


> 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: <>

More information about the openwrt-devel mailing list