On Fri, May 6, 2011 at 6:06 AM, Philippe Houdoin <philippe.houdoin@xxxxxxxxx> wrote: > But using strncmp() instead of strcmp() will make it totally safe, > which it's not yet. In this instance it wouldn't matter, since the string he's comparing to is the empty string, thus strcmp will always break after a single character comparison. In the general case you're right though. Regards, Rene