From: reeves@ayauw.zk3.dec.com (Jon Reeves)
Subject: Re: Segmentation Violation
Date: 1996/11/07 [thread overview]
Message-ID: <55t41k$650@lead.zk3.dec.com> (raw)
In-Reply-To: 55qg8v$tdi@pulp.ucs.ualberta.ca
In article <55qg8v$tdi@pulp.ucs.ualberta.ca>, nbehzad@ee.ualberta.ca (Nader Behzad) writes:
...
|> tempstring = (char *)Malloc(256*sizeof(char));
...
|> i = (char_count - strlen(tempstring)); /* <-------- A */
...
|> "tempstring" is NULL and this causes the program to crash at point A.
The strlen function is only defined on pointers to strings.
NULL is not a pointer to a string.
--
Jon Reeves Digital UNIX Software Group reeves@zk3.dec.com
prev parent reply other threads:[~1996-11-07 5:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-11-06 5:00 Segmentation Violation Nader Behzad
1996-11-07 5:00 ` Jon Reeves [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox