phroxy

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.z3bra.org/phroxy.git
Log | Files | Refs | LICENSE

commit fcf983a1138c7e93933c3722ec8735b92d57432b
parent 6080677947fba31e72da83dd8a881de1e37daf15
Author: Willy Goiffon <dev@z3bra.org>
Date:   Mon, 14 Sep 2020 16:21:15 +0200

Handle corner case when no item is specified

Diffstat:
Mphroxy.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/phroxy.c b/phroxy.c @@ -343,7 +343,7 @@ phroxy(char *url) { int sock; size_t len; - char item; + char item = 0; char *hole, *path, *host, *port; char *data = NULL, *srch = NULL; @@ -359,7 +359,9 @@ phroxy(char *url) if (!port) port = "70"; - item = *url++; + if (url) + item = *url++; + if (!item) item = '1';