diff options
author | portix <none@none> | 2012-10-23 01:00:42 +0200 |
---|---|---|
committer | portix <none@none> | 2012-10-23 01:00:42 +0200 |
commit | 1bf336e63e1c46a3005d1e4d555d294dd45a9af0 (patch) | |
tree | b55d987a4a31a07701a5f52c6b9fb5ad0dd553ae /src/util.c | |
parent | 371935c5857ff7440f2fd1e29d28c1bd2918e7cf (diff) | |
download | dwb-1bf336e63e1c46a3005d1e4d555d294dd45a9af0.zip |
Fixing element hider issues with webkit-1.10
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -612,8 +612,8 @@ util_domain_from_uri(const char *uri) { if ( (p = strstr(uri, "://")) ) { uri_p = p + 3; } - if ( (p = strchr(uri_p, '/')) ) { - strncpy(domain, uri_p, MIN(p - uri_p, sizeof(domain))); + if ( (p = strchr(uri_p, '/')) != NULL ) { + strncpy(domain, uri_p, MIN((unsigned int)(p - uri_p), sizeof(domain))); } char *ret = domain[0] ? domain : uri_p; return g_strdup(ret); |