-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check overflows and validate timestamp9 value range. #13
base: master
Are you sure you want to change the base?
Conversation
This patch helps add checks for potential overflows when converting other date time types to timestamp9 and adds checks for validating then timestamp9 values range [1900-01-01 00:00:00.000000000 UTC+0, 2262-01-01 00:00:00.000000000 UTC+0).
478676b
to
1f46a9d
Compare
Thanks for the submission. I'm open to having better checks here to prevent cases like the ones mentioned in #12 . Did you pick the current min/max range arbitrarily? I think the range is well suited for most cases, but maybe it's too restrictive. Would it be difficult to support the full range of Edit: Ah I see this may be quite complex in the addition with interval checks |
|
- Validate timestamp9 value in timestamp9_recv(). - Enlarge the timestamp9 value range to '[1700-01-01 UTC+0, 2262-01-01 UTC+0)'.
Yes, I pick the min/max year arbitrarily, but pick the date Based on your comment, I enlarge the value range to
Good catch! Thanks for pointing it out. |
In my latest commit, I modified |
I don't see it merged into 1.4.0. Any plan to merge and release this PR? Thank you. |
This patch helps add checks for potential overflows when converting other date time types to timestamp9 and adds checks for validating then timestamp9 values range [1900-01-01 00:00:00.000000000 UTC+0, 2262-01-01 00:00:00.000000000 UTC+0).
Trying to fix #12
P.S. I don't know if the value range is appropriate, let's discuss about it?