Bug 1008 - missing definition of minimum() macro in lib/util/arc4random_buf.c (runtime failure)
missing definition of minimum() macro in lib/util/arc4random_buf.c (runtime f...
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.9.8
Macintosh MacOS X
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-11-08 18:16 MST by Marius Schamschula
Modified: 2022-01-27 19:51 MST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marius Schamschula 2021-11-08 18:16:59 MST
I have been made aware that there is an issue with

lib/util/arc4random.c and lib/util/arc4random_buf.c making use of the minimum() macro, but this macro is only defined in lib/util/arc4random.c (in line 59) and not in lib/util/arc4random_buf.c:

arc4random.c:59:#define minimum(a, b) ((a) < (b) ? (a) : (b))

Symptom:

sudo will configure (with a sprintf warning), build, install, and activate OK, but invocation of sudo then fails with:
dyld: Symbol not found: _minimum

Solution:

include the definition of the minimum() macro also in lib/util/arc4random_buf.c

Original report (with patch file): https://trac.macports.org/ticket/63858
Comment 1 Todd C. Miller 2021-11-08 18:19:10 MST
This was fixed by https://www.sudo.ws/repos/sudo/rev/a66c68c3a976
Comment 2 Todd C. Miller 2022-01-27 19:51:45 MST
The changes are present in the 1.9.9 release.