Skip to content

Commit

Permalink
Bug 1247912 - convert left side expression to int64_t when assigning …
Browse files Browse the repository at this point in the history
…to mCookiesLifetimeSec in order to avoid overflow. r=jdm

MozReview-Commit-ID: H6LdaC2RfPs

--HG--
extra : rebase_source : 92eb974a14ee7450657f37b9d72f9fc956bff0f2
  • Loading branch information
Bogdan Postelnicu committed Feb 12, 2016
1 parent d4303cc commit 8aa1312
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/cookie/nsCookiePermission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ nsCookiePermission::PrefChanged(nsIPrefBranch *aPrefBranch,
if (PREF_CHANGED(kCookiesLifetimeDays) &&
NS_SUCCEEDED(aPrefBranch->GetIntPref(kCookiesLifetimeDays, &val)))
// save cookie lifetime in seconds instead of days
mCookiesLifetimeSec = val * 24 * 60 * 60;
mCookiesLifetimeSec = (int64_t)val * 24 * 60 * 60;
}

NS_IMETHODIMP
Expand Down

0 comments on commit 8aa1312

Please sign in to comment.