Skip to content

Commit

Permalink
Apply bounds checking to AssTimes generated from strings
Browse files Browse the repository at this point in the history
Originally committed to SVN as r6564.
  • Loading branch information
tgoyne committed Mar 11, 2012
1 parent 43f461e commit 1d4c0c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aegisub/src/ass_time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ AssTime::AssTime(wxString const& text)

// Milliseconds (includes seconds)
time += AegiStringToFix(text, 3, end, text.size());

// Limit to the valid range
time = mid(0, time, 10 * 60 * 60 * 1000 - 1);
}

wxString AssTime::GetASSFormated(bool msPrecision) const {
Expand Down

0 comments on commit 1d4c0c0

Please # to comment.