simon-git: doit (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Wed Jan 10 08:46:40 GMT 2024


TL;DR:
  8e2b86c Report a sensible error if no secret file provided.

Repository:     https://git.tartarus.org/simon/doit.git
On the web:     https://git.tartarus.org/?p=simon/doit.git
Branch updated: main
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2024-01-10 08:46:40

commit 8e2b86c781d92617bf75ca01c160d36bc8dba3d7
web diff https://git.tartarus.org/?p=simon/doit.git;a=commitdiff;h=8e2b86c781d92617bf75ca01c160d36bc8dba3d7;hp=2061db25c8560e0c5da72cd839bdcdb8d133da13
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Jan 10 08:44:55 2024 +0000

    Report a sensible error if no secret file provided.
    
    If you run doit.exe with an empty command line, it wouldn't actually
    _notice_ the lack of a shared-secret file name on the command line,
    which is an easy mistake because it's processing its arguments as a
    single string instead of an argv. So it would simply pass the empty
    string to fopen, which would return NULL - but _not_ set a Windows
    error code, leading to a rather silly box saying
    
      DoIt shared secret error
    
      Unable to open "": Error 0: The operation completed successfully.
    
    Now it prints a much more sensible error message in that situation!

 doit.c | 6 ++++++
 1 file changed, 6 insertions(+)



More information about the tartarus-commits mailing list