Permalink
Browse files

Fix integer overflow bug in AutoExpire::CalcParams().

Coverity defect 700589
  • Loading branch information...
stuartm committed Jun 29, 2012
1 parent 86eee5e commit de2eef39d5334f510ceeb61acb954f9c0382d3b9
Showing with 3 additions and 2 deletions.
  1. +3 −2 mythtv/programs/mythbackend/autoexpire.cpp
@@ -164,8 +164,9 @@ void AutoExpire::CalcParams()
}
uint64_t maxKBperMin = 0;
- uint64_t extraKB = gCoreContext->GetNumSetting("AutoExpireExtraSpace", 0) <<
- 20;
+ uint64_t extraKB = static_cast<uint64_t>
+ (gCoreContext->GetNumSetting("AutoExpireExtraSpace", 0))
+ << 20;
QMap<int, uint64_t> fsMap;
QMap<int, vector<int> > fsEncoderMap;

0 comments on commit de2eef3

Please sign in to comment.