|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: Secure coding in C (was Re: Administrivia #4883)
Subject: Re: Secure coding in C (was Re: Administrivia #4883)
From: Valery Dachev (valery
LINUX.HOME.BG)
Date: Mon Jan 17 2000 - 03:25:20 CST
- Next message: K Martin: "Re: Secure coding in C (was Re: Administrivia #4883)"
- Previous message: Ken Williams: "Re: ICQ >= 99* + CC Data"
- In reply to: spin0ff: "Re: Secure coding in C (was Re: Administrivia #4883)"
- Next in thread: Iván Arce: "Re: Secure coding in C (was Re: Administrivia #4883)"
- Reply: Valery Dachev: "Re: Secure coding in C (was Re: Administrivia #4883)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, 16 Jan 2000, spin0ff wrote:
> both strlen call will return when they encounter a \0, implying that after
> the third line, len will be long enough to hold a, b and the garbage
> following both a and b. c will be large enough to hold all of this.
Lucky you ! You have encountered the \0 symbol after your buffer and
before the end of the segment. Take a look at the situation where the \0
symbol is not there. Your program can explode with "Segmentation
fault" (or "Segmentation violation" in Windows). There's a simple example
in the attachment.
Bye.
..........................................................................
:Name : Valery Dachev :Organization: Linux Society of Bulgaria :
:E-Mail : valery
linux.home.bg :E-Mail : info
linux.home.bg :
:Homepage: --- none --- :Homepage : http://linux.home.bg :
:........:......................:............:...........................:
- TEXT/PLAIN attachment: Say 'BooM' !
- Next message: K Martin: "Re: Secure coding in C (was Re: Administrivia #4883)"
- Previous message: Ken Williams: "Re: ICQ >= 99* + CC Data"
- In reply to: spin0ff: "Re: Secure coding in C (was Re: Administrivia #4883)"
- Next in thread: Iván Arce: "Re: Secure coding in C (was Re: Administrivia #4883)"
- Reply: Valery Dachev: "Re: Secure coding in C (was Re: Administrivia #4883)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
This archive was generated by hypermail 2b27 : Mon Jan 17 2000 - 09:57:55 CST