Re:C++: A language for next generation web apps
by olliesaunders on Tuesday January 26, 2010 @07:25PM
(#1079357)
I had to read that a few times. What is he talking about?
Re:C++: A language for next generation web apps
by tedunangst on Tuesday January 26, 2010 @07:57PM
(#1079432)
1 wchar_t *
2 utf2wide(const char *utf)
3 {
4 size_t len;
5 wchar_t *wide;
6 len = mbstowcs(NULL, utf, 0);
7 wide = malloc(sizeof(*wide) * (len + 1));
8 mbstowcs(wide, utf, len);
9 return wide;
10 }
Re:C++: A language for next generation web apps
by gfodor on Tuesday January 26, 2010 @08:16PM
(#1079475)
That is definitely the most to-the-point response I've ever seen.
Re:C++: A language for next generation web apps
by st3fan on Wednesday January 27, 2010 @07:36AM
(#1080356)
Because the result of malloc is not checked, it can take the whole web server down if it returns NULL. Which can happen.
Re:C++: A language for next generation web apps
by tjake on Tuesday January 26, 2010 @11:19PM
(#1079753)
thats C not C++. geesh :P
lol.