wufuyue / yaffs2utils

Automatically exported from code.google.com/p/yaffs2utils
GNU General Public License v2.0
1 stars 3 forks source link

Unknown options cause the program to output garbage (and crash?) #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Steps to reproduce:
  unyaffs2 -f blah -p 2048 <image> <dir>
Expected:
  Unknown option: -f
Seen:
  <garbage in output>

Reason:
  if getopt_long encounters an unknown option, it will return '?' and the "default' clause of the switch() is hit. In that clause argv[option_index] is printed, rather than argv[optind].

Original issue reported on code.google.com by HIGH...@gmail.com on 17 Jan 2011 at 3:12

GoogleCodeExporter commented 8 years ago

Original comment by penguin.lin on 18 Jan 2011 at 6:31

GoogleCodeExporter commented 8 years ago
This bug was fixed in the current trunk.
I will close it when releasing the next tar file.

Thanks

Original comment by penguin.lin on 27 Jan 2011 at 2:05

GoogleCodeExporter commented 8 years ago

Original comment by penguin.lin on 1 Feb 2011 at 3:47

GoogleCodeExporter commented 8 years ago

Original comment by penguin.lin on 1 Feb 2011 at 3:48

GoogleCodeExporter commented 8 years ago

Original comment by penguin.lin on 3 Mar 2011 at 2:25

GoogleCodeExporter commented 8 years ago
Fixed in "yaffs2utils-0.1".

Original comment by penguin.lin on 8 Mar 2011 at 10:10