public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hugo Mills <hugo-lkml@carfax.org.uk>
To: Julien Rebetez <julien.r@bluewin.ch>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Linux-2.4.22  memory overwriting
Date: Sun, 1 Feb 2004 12:21:34 +0000	[thread overview]
Message-ID: <20040201122134.GC3183@carfax.org.uk> (raw)
In-Reply-To: <401CEDAD.70601@bluewin.ch>

[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]

On Sun, Feb 01, 2004 at 01:14:37PM +0100, Julien Rebetez wrote:
> Hi !
> I've writen the following program :
[snip]
> Should I not get a SIGSEV from the system ? Isn't it dangerous to allow 
> the user to put 5 elements in a 4 elements tab?

   This is nothing to do the the kernel. It's to do with C.

   Yes, it is dangerous to allow this behaviour. However, C doesn't
perform bounds checking on arrays -- this is left to the programmer to
ensure that an array is never accessed outside its bounds. The effects
of accessing (reading or writing) an array outside its bounds are
undefined. In this case, it's worked. In other situations, with
different arrays, it may not work.

   Nothing to see here. Move along.

   Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 1C335860 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
   --- Well, you don't get to be a kernel hacker simply by looking ---   
                    good in Speedos. -- Rusty Russell                    

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-02-01 12:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-01 12:14 Linux-2.4.22 memory overwriting Julien Rebetez
2004-02-01 12:21 ` Hugo Mills [this message]
2004-02-01 12:33 ` Roberto Sanchez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040201122134.GC3183@carfax.org.uk \
    --to=hugo-lkml@carfax.org.uk \
    --cc=julien.r@bluewin.ch \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox