Merge pull request #117 from darrencocco/master

Fix for #116
This commit is contained in:
van Hauser 2016-05-11 11:26:29 +02:00
commit c83a71ae87

View file

@ -789,8 +789,8 @@ int start_http_form(int s, char *ip, int port, unsigned char options, char *misc
if (strlen(str) - strlen(str2) == 0) { if (strlen(str) - strlen(str2) == 0) {
strcpy(str3, "/"); strcpy(str3, "/");
} else { } else {
strncpy(str3, str + strlen(str2), strlen(str) - strlen(str2) - 1); strncpy(str3, str + strlen(str2), strlen(str) - strlen(str2));
str3[strlen(str) - strlen(str2) - 1] = 0; str3[strlen(str) - strlen(str2)] = 0;
} }
} else { } else {
strncpy(str2, webtarget, sizeof(str2)); strncpy(str2, webtarget, sizeof(str2));
@ -859,7 +859,7 @@ int start_http_form(int s, char *ip, int port, unsigned char options, char *misc
found = analyze_server_response(s); found = analyze_server_response(s);
if (strlen(cookie) > 0) if (strlen(cookie) > 0)
process_cookies(ptr_cookie, cookie); process_cookies(&ptr_cookie, cookie);
} }
} }