cgmnlm

Unnamed repository; edit this file 'description' to name the repository.
git clone git://code.clttr.info/cgmnlm.git
Log | Files | Refs | README | LICENSE

commit b25b4576e3fd889b3edadb51ff9a387ef0bae653
parent 60cf41e7dd66897e6987704921b6cd57da1f084f
Author: Leon Henrik Plickat <leonhenrik.plickat@stud.uni-goettingen.de>
Date:   Tue, 22 Sep 2020 13:39:03 +0200

Correctly abort when launched with invalid URL

The return value of set_url() was not checked, meaning that when it
failed, gmnlm continued anyway, causing an assertion to fail and
subsequentially resulting in a segfault.

Diffstat:
Msrc/gmnlm.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gmnlm.c b/src/gmnlm.c @@ -797,7 +797,9 @@ main(int argc, char *argv[]) } if (optind == argc - 1) { - set_url(&browser, argv[optind], &browser.history); + if (!set_url(&browser, argv[optind], &browser.history)) { + return 1; + } } else { usage(argv[0]); return 1;