Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: strncpy() and NULL termination

From: Dan Cross <tenser(at)spitfire.ecsel.psu.edu>
Date: Sun Feb 16 1997 - 19:27:33 EST


> Excuse me for meddling. I would think that the return val from

I agree, but strncpy(3) doesn't return a value which is useful for this purpose. :-)

  • Dan C.

(strncpy(3) only returns NULL or a valid pointer, but there is no indication of truncation at all, unless you check to see if buf[len - 1] != '\0'.) Received on Sun Feb 16 16:28:29 1997

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 12:41:02 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library