Article View: comp.os.linux.help
Article #3strncpy bug?
From: Christopher W. Curtis
Date: Thu, 14 Mar 1996 04:09
Date: Thu, 14 Mar 1996 04:09
17 lines
969 bytes
969 bytes
Hi. I was wondering if this is a Linux thing (kernel 1.2.1) or a more general 'problem'. If you call strncpy as such: strncpy( dest, NULL, x ); it will seg fault. Is this common among all platforms, or just with Linux? The man page says nothing about it, but I would have presumed that if str[n]cpy were passed NULL as a source, it would merely catenate the destination. Did I presume wrong? Thanks, -- Christopher Curtis, Sun SysAdmin - http://www.ee.fit.edu/users/ccurtis Florida Institute of Technology - telnet bofh.engr.wisc.edu 666 Melbourne, Florida USA - Member, Team OS/2
Technical Details
Message-ID:
<ccurtis.826776589@ee.fit.edu>Path:
arc1-ca.pugleaf.net!zeno.fit.edu!ccurtisShow Full Headers
Complete Article Headers
Newsgroups: comp.os.linux.help,comp.lang.c Path: arc1-ca.pugleaf.net!zeno.fit.edu!ccurtis From: ccurtis@ee.fit.edu (Christopher W. Curtis) Subject: strncpy bug? Message-ID: <ccurtis.826776589@ee.fit.edu> Sender: news@zeno.fit.edu (USENET NEWS SYSTEM) Nntp-Posting-Host: pram.ee.fit.edu Organization: Florida Tech, CP/EE Dept. Date: Thu, 14 Mar 1996 04:09:49 GMT