arg_foreach

Matthias Andree matthias.andree at gmx.de
Sat May 10 02:39:58 CEST 2003


David Relson <relson at osagesoftware.com> writes:

> Seems like getopt() reorders arguments as it does its processing...  I
> know I've stepped through the code on Linux and only filenames are
> present.

It worked by accident, but outside the C standards (unless I'm confusing
them with ISO-C++ that is).

AFAIK the compiler needs only reserve room to hold 4 (next greater power
of 2) distinct values for bulk_e, so the optind assignment is already
bogus and might wrap. Fixing. Oh, and use fgetsl if you can, rather than
fgets. fgets is broken by its interface design.

-- 
Matthias Andree




More information about the bogofilter-dev mailing list