|
|
Log in / Subscribe / Register

Buffer Overflow Attacks and Their Countermeasures (Linux Journal)

Buffer Overflow Attacks and Their Countermeasures (Linux Journal)

Posted Mar 11, 2003 0:12 UTC (Tue) by cjcoats (guest, #9833)
Parent article: Buffer Overflow Attacks and Their Countermeasures (Linux Journal)

As noted by another responder, the article misses a lot. On the low-tech front, the solution can be as simple as

Program it in Fortran!
Not only is current-standard Fortran a nice and structured language to program in (with very mature compilers, structs, dynamic memory allocation, argument checking), it also has a safe implementation of character strings:
Think of a string as a struct with aq length-field and a pointer-to-contents field.

String assignment has the following semantics:

  • If the source is shorter than the target, pad the trailing end of the target with blanks; and
  • If the target is shorter than the source, just copy the leftmost portion of the source that fits, and truncate the rest.
It's string-handling, made safe by design!

fwiw.


The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:

Note: you can avoid this step in the future by logging into your LWN account.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds