[H-GEN] malloc() causing a segfault

Martin Pool mbp at linuxcare.com.au
Thu Aug 31 00:43:44 EDT 2000


On Thu, Aug 31, 2000 at 02:29:37PM +1000, Byron Ellacott wrote:
> [ Humbug *General* list - semi-serious discussions about Humbug and ]
> [ Unix-related topics.  Please observe the list's charter.          ]
> 
> On Thu, 31 Aug 2000, Martin Pool wrote:
> 
> >     strcpy(s, p);  /* C is very nice sometimes */
> 
> If, however, you check the manpage for strcpy(), you will see you
> shouldn't use it on overlapping regions.  

Huh.  That's true.  It makes me wish libc came with optional
assertions for such things.  I guess glib probably does.

-- 
Martin Pool, Linuxcare, Inc.
+61 2 6262 8990
mbp at linuxcare.com, http://www.linuxcare.com/
Linuxcare. Support for the revolution.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lists.humbug.org.au/pipermail/general/attachments/20000831/6cedc947/attachment.sig>


More information about the General mailing list