shithub: gemnine

Download patch

ref: 3082e1e3d7333b0d4ade74f61c49af4069dde1f7
parent: e8d5a68215de837b1dcef223fbcfbeeb70c2e3e8
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Mon May 18 14:33:46 EDT 2020

fix a crash in urlto

--- a/main.c
+++ b/main.c
@@ -63,7 +63,8 @@
 			len = e - url->url;
 		u = smprint("%.*s/%s%s", len, url->url, u, trail);
 	}
-	cleanname(strchr(strchr(u, ':') + 3, '/'));
+	if((e = strchr(strchr(u, ':') + 3, '/')) != nil)
+		cleanname(e);
 	return u;
 }