Shlomi Fish wrote:
What difference does it make for a single-file program? What is disturbing, though is that he's working as root.
dho! he working as root... that's the problem! :)
how come? he is refering to memory which is not allocated? lets ignore the issue that the amount of allocated memory can be also 20 as someone sayd before...
mem[102] = 'c'.
SEGFAULT! the allocated memory is found at memory 100-103. Bad Thazi!
No, it's OK so far.
In real life Linux does 'allow' the execution of this program, as it printed lines after this point. Can anyone explain?
!?
free( 102 ) .... wait... 102 is not allocated! 100 was allocated!
IMHO this is the line that really segfaults.
-------------------------------------------------------------------------- Haifa Linux Club Mailing List (http://www.haifux.org) To unsub send an empty message to [EMAIL PROTECTED]
