mirror of
https://gitea.tendokyu.moe/Dniel97/segatools.git
synced 2024-11-24 05:20:10 +01:00
Merge pull request 'dns: fix msvc build' (#50) from Haruka/segatools:fixmsvc into develop
Reviewed-on: https://gitea.tendokyu.moe/Dniel97/segatools/pulls/50
This commit is contained in:
commit
6d8ffb46ef
@ -670,7 +670,7 @@ DWORD WINAPI hook_send(SOCKET s, const char* buf, int len, int flags) {
|
|||||||
char *host_value_end = strstr(host_value_start, "\r\n");
|
char *host_value_end = strstr(host_value_start, "\r\n");
|
||||||
if (host_value_end != NULL) {
|
if (host_value_end != NULL) {
|
||||||
int value_len = host_value_end - host_value_start;
|
int value_len = host_value_end - host_value_start;
|
||||||
char host_value[value_len + 1];
|
char* host_value = (char*)malloc(value_len + 1);
|
||||||
strncpy(host_value, host_value_start, value_len);
|
strncpy(host_value, host_value_start, value_len);
|
||||||
host_value[value_len] = '\0';
|
host_value[value_len] = '\0';
|
||||||
|
|
||||||
@ -685,6 +685,7 @@ DWORD WINAPI hook_send(SOCKET s, const char* buf, int len, int flags) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
free(host_value);
|
||||||
}
|
}
|
||||||
len = (int)strlen(new_buf);
|
len = (int)strlen(new_buf);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user