Menu

#37 dwipe CLI: getopt_long() optstring argument incorrect

dban-2.0.0_i586
open
nobody
interface (3)
5
2009-04-21
2009-04-21
Bill C
No

This affects the use of dwipe as a stand-alone command line program.

dban-2.0.0_buildroot/package/dwipe/dwipe-2.1.0/options.c
51c
< char dwipe_options_short [] = "Chmpr:";
---
> char dwipe_options_short [] = "hm:pr:";

(1) Lack of ':' after the 'm' prevents the parsing of the argument (method_name)
e.g. --method dod is ok and -m dod seg faults
as a 0 address passed as optarg to strcmp( optarg,...) causing a seg fault.
(2) There is no short argument processed for the character 'C', hence it is not required.

Discussion


Log in to post a comment.