From 821301de15520d51f4cbdba30372bc062f8a955a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 29 Apr 2011 16:46:49 +0200 Subject: ConnectionExists: avoid NULL dereference When checking for connections that are bound to a particular device we must make sure we don't compare with a NULL pointer. --- lib/url.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/url.c b/lib/url.c index 7c70be818..fa0557711 100644 --- a/lib/url.c +++ b/lib/url.c @@ -2948,6 +2948,7 @@ ConnectionExists(struct SessionHandle *data, if((check->localport != needle->localport) || (check->localportrange != needle->localportrange) || !check->localdev || + !needle->localdev || strcmp(check->localdev, needle->localdev)) continue; } -- cgit v1.2.3