Bugtraq mailing list archives
Re: StackGuard with ... Re: [Paper] Format bugs.
From: Hannah Schröter <hannah () SCHLUND DE>
Date: Mon, 24 Jul 2000 12:20:04 +0200
Hello! On 07/21, Brett Glass wrote:
2) The C language itself has no way of specifying a MINIMUM number of arguments for a function call. Had the compiler noted that setproctitle() and similar functions need at least two arguments, the mistakes would have been caught from the get-go.
However, setproctitle("foo") is correct and safe!
[...]
The former requires changing the conventions used by the standard C libraries, which is probably infeasible.
Not only that, but reasonable alternatives are cumbersome in C. Compare the C *printf* and similar functions with what is possible in Standard ML (strongly typed formats, where the compiler can check that the arguments are applied according to the format in *every* case) or experimental type systems like Cayenne's (you can derive the parameter types from a C style format *string*, and the call is accepted only if the compiler can prove at compile time that the arguments always match the format string, see http://www.cs.chalmers.se/~augustss/cayenne/ for details; note that in practise undecidable type systems aren't that much a problem. The type system of C++ is undecidable, too). In other languages, there can at least be safe runtime checking, such as Lisp's format function.
[...]
Regards, Hannah. -- Hannah Schröter Technik hannah () schlund de Bei Schlund + Partner AG Erbprinzenstr. 4-12 D-76133 Karlsruhe Besuchen Sie unseren Automarkt http://www.webauto.de/
Current thread:
- Roxen security alert: Problems with URLs containing null characters., (continued)
- Roxen security alert: Problems with URLs containing null characters. Peter Bortas (Jul 21)
- Re: StackGuard with ... Re: [Paper] Format bugs. Brett Glass (Jul 21)
- Re: StackGuard with ... Re: [Paper] Format bugs. Greg A. Woods (Jul 24)
- Re: StackGuard with ... Re: [Paper] Format bugs. Brett Glass (Jul 25)
- Re: StackGuard with ... Re: [Paper] Format bugs. mixter (Jul 24)
- Re: StackGuard with ... Re: [Paper] Format bugs. Linus Akesson (Jul 24)
- Re: StackGuard with ... Re: [Paper] Format bugs. Dan Harkless (Jul 25)
- Re: StackGuard with ... Re: [Paper] Format bugs. Valentin Nechayev (Jul 24)
- Re: StackGuard with ... Re: [Paper] Format bugs. Greg A. Woods (Jul 24)
- Re: StackGuard with ... Re: [Paper] Format bugs. Dick St.Peters (Jul 25)
- Re: StackGuard with ... Re: [Paper] Format bugs. Hannah Schröter (Jul 24)
- Re: StackGuard with ... Re: [Paper] Format bugs. Stephen J. Friedl (Jul 24)
- Re: StackGuard with ... Re: [Paper] Format bugs. Casper Dik (Jul 24)
- Re: StackGuard with ... Re: [Paper] Format bugs. stanislav shalunov (Jul 24)
- Re: StackGuard with ... Re: [Paper] Format bugs. Daniel Jacobowitz (Jul 24)
- Re: StackGuard with ... Re: [Paper] Format bugs. Alan DeKok (Jul 22)
- Re: StackGuard with ... Re: [Paper] Format bugs. Keith Owens (Jul 24)
- Re: StackGuard with ... Re: [Paper] Format bugs. Greg A. Woods (Jul 24)
- Re: StackGuard with ... Re: [Paper] Format bugs. Gerardo Richarte (Jul 24)
- Re: StackGuard with ... Re: [Paper] Format bugs. Greg A. Woods (Jul 25)
- Re: StackGuard with ... Re: [Paper] Format bugs. Theo de Raadt (Jul 24)