Re:Xorg can now run without privilege on OpenBSD
by raverbashing on Sunday February 23, 2014 @05:54PM
(#7288061)
Funny how they use the word "idiot" then use strcmp instead of strncmp for comparison.
[ Parent
| on HN ]
Re:Xorg can now run without privilege on OpenBSD
by icebraining on Sunday February 23, 2014 @06:26PM
(#7288192)
Since they're comparing against a literal string, which is guaranteed to be NULL terminated, what's wrong with that?
Re:Xorg can now run without privilege on OpenBSD
by raverbashing on Sunday February 23, 2014 @06:35PM
(#7288236)
Apparently it is safe
http://stackoverflow.com/questions/448563/am-i-correct-that-...
However, some people may have the temptation of, when changing the code, replacing it with a non-literal string, or, in a rare case, there's a memory corruption affecting the literal string making it lose the null-termination.
Re:Xorg can now run without privilege on OpenBSD
by poolpOrg on Monday February 24, 2014 @07:33AM
(#7290413)
so there's a bug if someone is tempted to modify it and break otherwise correct code ?
i'd be tempted to say that we can apply the same logic to about 100% of code ever written.
Re:Xorg can now run without privilege on OpenBSD
by raverbashing on Monday February 24, 2014 @10:59AM
(#7291461)
Not a bug, but some warning comment might be useful.