help-gengetopt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[help-gengetopt] Input validation


From: Tiago Menezes
Subject: [help-gengetopt] Input validation
Date: Thu, 22 Dec 2005 12:08:45 -0000

Dear all,

I've recently started using gengetopt, a fantastic tool that has
dramatically increased my productivity - thank you Lorenzo Bettini.

I would like to raise an issue related to the validation of the
command-line options (version 2.14: cygwin on Windows 2000, and on
Linux).

It is possible to type a text string as a value for an integer-type
option. The parsed value will be 0, which may well be part of the
acceptable input range. Reading cmdline.c, the offending code seems to
be the function strtol(), inside cmdline_parser_internal(). Is this
behaviour a true bug, or am I barking up the wrong tree (in which case
I'd appreciate learning how to circumvent the problem from a seasoned
programmer please).

Many thanks and a Happy Christmas everyone,
TM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]