[H-GEN] malloc() causing a segfault

Andrae Muys a.muys at mailbox.uq.edu.au
Thu Aug 31 00:30:43 EDT 2000


[ 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:

> Dude, an even better implementation would *work*.  :-)

Indeed.  You should probably be aware that strcpy is not guarrenteed to
work if the strings overlap so..... :)

>     strcpy(s, p);  /* C is very nice sometimes */
 (but only when you use it according to standard :)

Andrae
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Andrae Muys <andrae at humbug.org.au> "Never ascribe to malice that which is
Shortech International Ltd          adequately explained by incompetence."
                                                     -Napoleon Bonaparte


--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.



More information about the General mailing list