GNOME Bugzilla – Bug 540013
g_date_valid_dmy should validate year
Last modified: 2018-04-13 14:32:51 UTC
g_date_valid_dmy should check that the year is valid by storing it in a
local GDate structure and verify that the same value can be read from
there. (Or, bluntly, check <= 65535.)
Created attachment 370868 [details] [review]
gdate: Comment that g_date_valid_dmy() does all necessary bounds checks
Make it more obvious that an explicit check isn’t needed for the upper
bound on years, since it’s limited by the type width.
Add a unit test to demonstrate this.
Signed-off-by: Philip Withnall <firstname.lastname@example.org>
Review of attachment 370868 [details] [review]:
Attachment 370868 [details] pushed as 33749d8 - gdate: Comment that g_date_valid_dmy() does all necessary bounds checks