Linux Today: Linux News On Internet Time.

More on LinuxToday

Unsafe Functions In C And Their Safer Replacements: Strings Part II

Mar 03, 2009, 03:03 (5 Talkback[s])


Re-Imagining Linux Platforms to Meet the Needs of Cloud Service Providers

[ Thanks to An Anonymous Reader for this link. ]

"Read this thread about the original patch that was submitted to add these functions to libc. Essentially, it was rejected on the basis that these functions hide problems instead of solving them and would actually lead to hard to detect bugs that creep in because of unsolicited truncation caused by these functions. A sample implementation of strlcpy looks like this:"

Complete Story

Related Stories: