Skip to content

Commit

Permalink
Add test for overflow on invalid timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
link2xt authored and staktrace committed Dec 26, 2022
1 parent bea8f61 commit 3a60551
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dateparse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,5 +224,8 @@ mod tests {

// Day cannot be zero.
assert!(dateparse("Wed, 0 Jan 1970 00:00:00 +0000").is_err());

// Regression test for integer overflow on invalid timezone.
assert!(dateparse("Thu, 1 Jan 1970 00:00:00 +2147483647").is_err());
}
}

0 comments on commit 3a60551

Please sign in to comment.