[Rpm-maint] [rpm-software-management/rpm] Undefined pointer comparison in macro.c (#1602)

Demi Marie Obenour notifications at github.com
Fri Mar 26 08:59:08 UTC 2021


> That is probably undefined behavior in C11 but AIUI not in C99, which rpm uses.

It is undefined in C99; see http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf, §6.3.2.3:

> Regardless how an invalid pointer is created, any use of it yields undefined behavior.

So I still believe it should be fixed.

> Perhaps I wasn't clear enough in my earlier comment today: as a rule of thumb, I'm _not_ interested in undefined behavior findings, exactly because of it's totally undefined what standard it's checking. Unless it reveals a concrete bug of course.

This is undefined behavior in C99, and includes a reproducible test case.  I consider that to be a concrete bug.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1602#issuecomment-808051272
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210326/9c5082f5/attachment.html>


More information about the Rpm-maint mailing list