Article View: es.comp.os.linux.programacion
Article #11784Re: Segmentation fault
From: Jesús Carrete Montaña
Date: Thu, 04 Oct 2001 23:06
Date: Thu, 04 Oct 2001 23:06
25 lines
1746 bytes
1746 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> "X" == X <x@xxx.com> writes:
X> struct kk { int popo; char *name; };
X> struct kk p;
X> strcpy (p.name, "Jamoncito\n");
p.name apunta a una direcci�n de memoria cualquiera, no a una
en la que hayas reservado memoria expl�citamente con malloc. Es como
una rray de tama�o 0. Al intentar meter "Jamoncito\n" en �l escribes
en memoria no reservada y da segfault.
Un saludo.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.6 and Gnu Privacy Guard <http://www.gnupg.org/>
iD8DBQE7vOuKfUtQQKOnZ1IRAlz6AKCXWL2H2oukpXDTic2jkYCXvLw1bQCgqYrb
6kQAE8GzHI6Jvg/nICaZ7l4=
=6r8O
-----END PGP SIGNATURE-----
Technical Details
Message-ID:
<87lmirknsk.fsf@meltdown.ion>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!fu-berlin.de!uni-berlin.de!182-coru-x34.libre.retevision.ES!not-for-mailReferences:
<lnhip9.bq.ln@xxx.com>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,b3c8decf211f42e0 X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2001-10-04 16:30:15 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!fu-berlin.de!uni-berlin.de!182-coru-x34.libre.retevision.ES!not-for-mail From: kuantiko@escomposlinux.org (Jesús Carrete Montaña) Newsgroups: es.comp.os.linux.programacion Subject: Re: Segmentation fault Date: 05 Oct 2001 01:06:51 +0200 Lines: 25 Sender: kuantiko@meltdown.ion Message-ID: <87lmirknsk.fsf@meltdown.ion> References: <lnhip9.bq.ln@xxx.com> NNTP-Posting-Host: 182-coru-x34.libre.retevision.es (62.83.57.182) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: fu-berlin.de 1002238206 20181722 62.83.57.182 (16 [54696]) X-Orig-Path: relativistic.homeip.net!nobody User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7