Bugtraq mailing list archives
Re: StackGuard with ... Re: [Paper] Format bugs.
From: Valentin Nechayev <netch () lucky net>
Date: Mon, 24 Jul 2000 13:16:32 +0300
Fri, Jul 21, 2000 at 22:48:57, brett wrote about "Re: StackGuard with ... Re: [Paper] Format bugs.":
Which brings up a more interesting question: Don't these errors really reflect more fundamental problems in the development tools? It seems to me that the bugs arose because: 1) Format strings in the C libraries use a sort of "in-band signalling" -- that is, they can mix text with format designators. This means that passing the text you want to print as the format string produces results that appear to be correct.
Well, but it is programmers' and code checking problem. It is easy to make mistake of another class with the same result.
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.
What version of C you mean? Possibly it is true for K&R, but for ANSI it is wrong. When one writes prototype such as int fooprintf( foo_t* foo, const char* format, ... ) first 2 arguments are strongly specified and fixed.
The former requires changing the conventions used by the standard C libraries, which is probably infeasible.
It is IMHO really needed to include something similar to GCC's __attribute((format(*printf))) to C standard. All another aspects can be handled with exiting features.
Current thread:
- StackGuard with ... Re: [Paper] Format bugs., (continued)
- StackGuard with ... Re: [Paper] Format bugs. Alan DeKok (Jul 21)
- [RHSA-2000:044-02] Updated PAM packages are available. bugzilla () REDHAT COM (Jul 21)
- Re: StackGuard with ... Re: [Paper] Format bugs. Theo de Raadt (Jul 21)
- 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)