Re:Arc4random – randomization for all occasions
by sarciszewski on Friday November 21, 2014 @10:19AM
(#8641627)
What is the reason for that? :(
[ Parent
| on HN ]
Re:Arc4random – randomization for all occasions
by IvyMike on Friday November 21, 2014 @02:13PM
(#8642769)
Drepper's caustic style aside, his point ultimately was that truncation is still a problem. Whether or not you think glibc should include strlcat, this is an important point to understand.
More discussion here: http://stackoverflow.com/q/2114896/67591
Re:Arc4random – randomization for all occasions
by tedunangst on Friday November 21, 2014 @02:20PM
(#8642813)
Note that you can mechanically translate strcat(dst, src) to strlcat(dst, src, SIZE_MAX) with no loss of functionality or change in behavior. No worries about truncation, either. Exactly the same thing.
Now, if reading a piece of code that does strlcat(dst, src, SIZE_MAX) would make you feel uncomfortable, the question is how should you feel reading code that uses strcat?
Re:Arc4random – randomization for all occasions
by pdw on Friday November 21, 2014 @10:24AM
(#8641652)
Not specified in any standard, not much of an improvement according to the glibc maintainers, and already provided in libbsd.
Re:Arc4random – randomization for all occasions
by edwintorok on Friday November 21, 2014 @10:50AM
(#8641754)
Speaking of libbsd it should be updated to use ChaCha20 too:
https://bugs.freedesktop.org/show_bug.cgi?id=85827