commit | 5845caa464d51e1dceeb6282c3a00957ae435de1 | [log] [tgz] |
---|---|---|
author | Theodore Ts'o <tytso@mit.edu> | Mon Aug 20 22:55:33 2007 -0400 |
committer | Theodore Ts'o <tytso@mit.edu> | Mon Aug 20 22:55:33 2007 -0400 |
tree | 5e99d79a358d3bd38dc4e3705badb063997d20a2 | |
parent | 35246253212357f9c1d6e3bbd3c0765d9c9273c9 [diff] |
Use sscanf instead of atoi when parsing e2fsck options atoi() does not check for errors so it shouldn't be used for human input. For example, if the user enters the command "e2fsck -C -n" and forgets that -C requires an argument, the -n will be used as the argument to -C, and not parsed as an option. When using sscanf(), this error case can be detected. Addresses-Debian-Bug: #435381 Signed-off-by: Bernd Schubert <bs@q-leap.de> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>