hercules-390 / hyperion

Hercules 390
Other
248 stars 67 forks source link

Bare r command on Hercules console with no argument causes crash due to access violation #157

Closed PeterCoghlan closed 7 years ago

PeterCoghlan commented 7 years ago

The debugger shows the access violation happens at the sscanf() call in parse_range() in hsemisc.c due to operand being null.

There are no problems with the v and u commands which also call parse_range() but these have a check for argc being anything other than 1 before calling parse_range() and issue an error message if this is not the case.

jphartmann commented 7 years ago

Please pull and retest.

PeterCoghlan commented 7 years ago

Many thanks.

An r command on it's own now results in the message:

HHC17000E Missing or invalid argument(s)

and no crash.

However, an r command followed by more than one whitespace delimited argument is accepted and the second and subsequent arguments either do nothing or have some effect which is not mentioned in the help text.

jphartmann commented 7 years ago

Please pull and retest.

PeterCoghlan commented 7 years ago

Many thanks. All looks good now.