From: Paul H. <pau...@gm...> - 2012-10-21 02:21:50
|
In libupnp httpreadwrite.c, the function get_hoststr returns the value of a temporary object in the parameter hoststr. I believe the correct form of this function is: static int get_hoststr(const char* url_str, const char **hoststr, size_t *hostlen) { char *temp; *hoststr = strstr(url_str, "//"); if (*hoststr == NULL) return UPNP_E_INVALID_URL; *hoststr += 2; temp = strchr(*hoststr, '/'); if (temp == NULL) return UPNP_E_INVALID_URL; *hostlen = temp - *hoststr; return UPNP_E_SUCCESS; } Please let me know if I'm mistaken. Thanks |