Thread (1 message) 1 message, 1 author, 2020-04-22

Re: [PATCH 2/3] credential: teach `credential_from_url()` a non-strict mode

From: Junio C Hamano <hidden>
Date: 2020-04-22 23:02:18

Johannes Schindelin [off-list ref] writes:
It is not obvious from the diff: `url` is never changed. It would still
point at the first `h`, as you said.
quoted
quoted
+	if (slash - url > 0)
+		c->host = url_decode_mem(host, slash - host);
...
I guess a better condition would be `if (proto_end || slash - host > 0)`.
Yeah, that would probably be more intuitive to read.  What triggered
my reaction was the mismatch between "slash - url" in the condition
and "slash - host" that specifies the length of the memory region.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help