Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions cxx/isce3/focus/Chirp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ formLinearChirp(double chirprate,

// check for possible overflow before double -> int conversion
double d_size = samplerate * duration + 1;
double d_maxsize = std::numeric_limits<int>::max();
if (d_size > d_maxsize) {
if (d_size > std::numeric_limits<int>::max() || d_size < std::numeric_limits<int>::min()) {
throw isce3::except::OverflowError(ISCE_SRCINFO(), "chirp size exceeds max int value");
}

Expand Down