![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
sci.crypt archiveRe: Public disclosure of discovered vulnerabilities
From: Andrew Swallow <am.swallow@btopenworld.com>
Date: Thu Jun 09 2005 - 15:55:54 CEST
Douglas A. Gwyn wrote:
> Larry Elmore wrote:
The problem of buffer overruns is language independent - they
Managerial point, the more complex algorithm takes longer to run
/* Example of bad code that will suffer buffer overruns *\
global POINTER, BUFFER (MAX_BUFFER)
POINTER = POINTER + 1
return
end procedure
/* Now how it should have been written */
global COUNT, POINTER, BUFFER (MAX_BUFFER)
COUNT = COUNT + 1
print "Error buffer overflow"
else
POINTER = POINTER + 1
BUFFER (POINTER) = DATA
end if
return
end procedure
Note the global variables are used by the READ_DATA and
Andrew Swallow
|