|
2009-07-10
| ||
| 05:29 | • Closed ticket [2819227fff]: broken compat/mkstemp.c plus 8 other changes artifact: 243606528f user: dkf | |
|
2009-07-09
| ||
| 20:35 | • New ticket [2819227fff]. artifact: 01300bb753 user: dgp | |
broken compat/mkstemp.c
Closed / Fixed2819227fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2009-07-09 20:35:35
Doing a test build of HEAD on an IRIX64 6.5 system, apparently the mkstemp() replacement routine in compat/mkstemp.c is called into service. It segfaults. Tracking it down, the problem is that the code assumes the range of the random() function is bounded by RAND_MAX. At least on this system that is false. RAND_MAX bounds the range of the rand() call and has a much smaller value than the range of the random() call. Simpleminded fix is to replace the random() call with a rand() call instead.
dkfplain2009-07-10 05:29:07
allow_comments - 1 Grrr! The OSX documentation round here is rather broken. (It gets confused between the standard and the sub-library of OpenSSL that happens to have a similar name, and it recommends using random() instead of rand() anyway.) What a mess.
Log in (anonymous is fine) to add a comment.