8f96a38b9803beac2d85f4c133ce27244922cfc6 chinhli Fri Jun 15 15:32:56 2012 -0700 Yet another warning fix. diff --git src/hg/hgLogin/hgLogin.c src/hg/hgLogin/hgLogin.c index 1efb101..d18bf48 100644 --- src/hg/hgLogin/hgLogin.c +++ src/hg/hgLogin/hgLogin.c @@ -1034,36 +1034,36 @@ return TRUE; else return FALSE; } char *cookieDomainName() /* Return the domain name to be used by the cookies or NULL. Allocd * here. */ /* Return central.domain if the returnToURL is also in the same domain * */ /* else return the domain in returnTo URL generated by (remote) * hgSession.*/ { char *centralDomain=cloneString(cfgOption(CFG_CENTRAL_DOMAIN)); char *returnURL = getReturnToURL(); -char *returnToDomain; +char returnToDomain[256]; sscanf(returnURL, "http://%[^/]", returnToDomain); if (endsWith(returnToDomain,centralDomain)) return centralDomain; else - return returnToDomain; + return cloneString(returnToDomain); } void displayLoginSuccess(char *userName, int userID) /* display login success msg, and set cookie */ { hPrintf("
" "
" "" "\n"); /* Set cookies */ char *domainName=cookieDomainName(); hPrintf("\n"