Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Saturday, 27-Jul-2024 09:56:20 JSTHaelwenn /элвэн/ :triskell: @alanc @solardiz I guess as Ulrich Drepper pointed you'd need to check the return value before using *ptr, which makes a bit of sense to me although it's a footgun for asprintf to not make *ptr NULL in case of error.
At least I think it's doable for static analyzers to require error checking for asprintf and I guess if it gets into ISO C with the same problem, for compilers to do the check.