{"push_id":774696450,"size":5,"distinct_size":5,"ref":"refs/heads/master","head":"3f563e90e85cb378f9f40e6a10bc50b309b39ab1","before":"315267abcd2eeb467820a3fada43874e35bbcd3d","commits":[{"sha":"cccc95f28ace0be4fe97537dbd867c08fbf71a8e","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@loowit.net","name":"James Perkins"},"message":"strptime %z: fix rounding, extend range to +/-9959 [BZ #16141]\n\nTopic: strptime supports a %z input field descriptor, which parses a\ntime zone offset from UTC time into the broken-out time field tm_gmtoff.\n\nProblems:\n\n1) In the current implementation, the minutes portion calculation is\ncorrect only for minutes evenly divisible by 3. This is because the\nminutes value is converted to decimal time, but inadequate precision\nleads to rounding which calculates results that are too low for\nsome values.\n\nFor example, due to rounding, a +1159 offset string results in an\nincorrect tm_gmtoff of 43128 (== 11 * 3600 + 58.8 * 60) seconds,\ninstead of 43140 (== 11 * 3600 + 59 * 60) seconds. In contrast,\na +1157 offset (minutes divisible by 3) does not cause the bug,\nand results in a correct tm_gmtoff of 43020.\n\n2) strptime's %z specifier will not parse time offsets less than\n-1200 or greater than +1200, or if only hour digits are present, less\nthan -12 or greater than +12. It will return NULL for offsets outside\nthat range. These limits do not meet historical and modern use cases:\n\n  * Present day exceeds the +1200 limit:\n    - Pacific/Auckland (New Zealand) summer time is +1300.\n    - Pacific/Kiritimati (Christmas Island) is +1400.\n    - Pacific/Apia (Samoa) summer time is +1400.\n  * Historical offsets exceeded +1500/-1500.\n  * POSIX supports -2459 to +2559.\n  * Offsets up to +/-9959 may occasionally be useful.\n  * Paul Eggert's notes provide additional detail:\n    - https://sourceware.org/ml/libc-alpha/2014-12/msg00068.html\n    - https://sourceware.org/ml/libc-alpha/2014-12/msg00072.html\n\n3) tst-strptime2, part of the 'make check' test suite, does not test\nfor the above problems.\n\nCorrective actions:\n\n1) In time/strptime_l.c, calculate the offset from the hour and\nminute portions directly, without the rounding errors introduced by\ndecimal time.\n\n2) Remove the +/-1200 range limit, permitting strptime to parse offsets\nfrom -9959 through +9959.\n\n3) Add zone offset values to time/tst-strptime2.c.\n\n  * Test minutes evenly divisible by three (+1157) and not evenly\n    divisible by three (+1158 and +1159).\n  * Test offsets near the old and new range limits (-1201, -1330, -2459,\n    -2500, -99, -9959, +1201, +1330, +1400, +1401, +2559, +2600, +99,\n    and +9959)\n\nThe revised strptime passes all old and new tst-strptime2 tests.","distinct":true,"url":"https://api.github.com/repos/bminor/glibc/commits/cccc95f28ace0be4fe97537dbd867c08fbf71a8e"},{"sha":"be13f5a4baa40af3611208edc77fd588ff2c0fab","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@loowit.net","name":"James Perkins"},"message":"time/tst-strptime2.c: test full input range +/- 0-9999\n\nstrptime's %z specifier parses a string consisting of a sign ('+'\nor '-'), two hours digits, and optionally two minutes digits, into a\ntm.tm_gmtoff field containing the signed number of seconds the time\nzone is offset from UTC time.\n\nThe time/tst-strptime2.c program passes a short list of strings through\nstrptime, validating that either the gmtoff value returned matches an\nexpected value, or that strptime returns an expected NULL for invalid\nstrings (for example, when the minutes portion of the string is outside\nof the range 00 to 59, or the sign is missing before the hours digits).\n\nIn review of strptime fixes, Carlos O'Donell expressed a wish that\nthe test function iterate through the entire range of all possible\nnumeric strings (-9999 to +9999) which could be passed to strptime %z,\nand validate the correct response.\n\nSpecifically, the test will look for a NULL response from strptime\nwhen:\n\n  * sign ('+' or '-') is not present before the first digit (invalid\n    format).\n  * A sign and no digits are found (invalid format).\n  * A sign and one digit are found (invalid format).\n  * A sign and three digits are found (invalid format).\n  * A sign and four digits (-9999 to +9999) are found but the last\n    two digits (minutes) are in the range 60 to 99.\n\nThe test will look for a success response from strptime with\ntm.tm_gmtoff matching the calculated tm_gmtoff value when:\n\n  * A sign and four digits are found (-9999 to +9999), and the last\n    two digits (minutes) are in the range 00 to 59.\n  * A sign and two digit strings are found (-99 to +99).\n\nThe test's iteration over the possible digit values results in 22223\ntest strings prepared, tested, and passed by strptime.\n\nThe test supports a --verbose command line option which will show\nthe test results of every test input, and a final summary of all\ntests. Here is some sample output:\n\n  PASS: input \"1113472456  1030\", expected: invalid, return value NULL\n  PASS: input \"1113472456 +\", expected: invalid, return value NULL\n  PASS: input \"1113472456 -\", expected: invalid, return value NULL\n  PASS: input \"1113472456 +0\", expected: invalid, return value NULL\n  PASS: input \"1113472456 -0\", expected: invalid, return value NULL\n  PASS: input \"1113472456 +1\", expected: invalid, return value NULL\n  ...\n  PASS: input \"1113472456 +9\", expected: invalid, return value NULL\n  PASS: input \"1113472456 -9\", expected: invalid, return value NULL\n  PASS: input \"1113472456 +00\", expected: valid, tm.tm_gmtoff 0\n  PASS: input \"1113472456 -00\", expected: valid, tm.tm_gmtoff 0\n  PASS: input \"1113472456 +01\", expected: valid, tm.tm_gmtoff 3600\n  PASS: input \"1113472456 -01\", expected: valid, tm.tm_gmtoff -3600\n  PASS: input \"1113472456 +02\", expected: valid, tm.tm_gmtoff 7200\n  ...\n  PASS: input \"1113472456 +99\", expected: valid, tm.tm_gmtoff 356400\n  PASS: input \"1113472456 -99\", expected: valid, tm.tm_gmtoff -356400\n  PASS: input \"1113472456 +000\", expected: invalid, return value NULL\n  PASS: input \"1113472456 -000\", expected: invalid, return value NULL\n  PASS: input \"1113472456 +001\", expected: invalid, return value NULL\n  ...\n  PASS: input \"1113472456 +999\", expected: invalid, return value NULL\n  PASS: input \"1113472456 -999\", expected: invalid, return value NULL\n  PASS: input \"1113472456 +0000\", expected: valid, tm.tm_gmtoff 0\n  PASS: input \"1113472456 -0000\", expected: valid, tm.tm_gmtoff 0\n  PASS: input \"1113472456 +0001\", expected: valid, tm.tm_gmtoff 60\n  PASS: input \"1113472456 -0001\", expected: valid, tm.tm_gmtoff -60\n  ...\n  PASS: input \"1113472456 +0059\", expected: valid, tm.tm_gmtoff 3540\n  PASS: input \"1113472456 -0059\", expected: valid, tm.tm_gmtoff -3540\n  PASS: input \"1113472456 +0060\", expected: invalid, return value NULL\n  PASS: input \"1113472456 -0060\", expected: invalid, return value NULL\n  ...\n  PASS: input \"1113472456 +0099\", expected: invalid, return value NULL\n  PASS: input \"1113472456 -0099\", expected: invalid, return value NULL\n  PASS: input \"1113472456 +0100\", expected: valid, tm.tm_gmtoff 3600\n  PASS: input \"1113472456 -0100\", expected: valid, tm.tm_gmtoff -3600\n  PASS: input \"1113472456 +0101\", expected: valid, tm.tm_gmtoff 3660\n  ...\n  PASS: input \"1113472456 +9999\", expected: invalid, return value NULL\n  PASS: input \"1113472456 -9999\", expected: invalid, return value NULL\n  PASS: 22223 input strings: 0 fail, 22223 pass\n\nAny failing test will result in printing the failed line to stdout, and\nwill trigger the printing of the summary line at the of all tests. For\nexample:\n\n  FAIL: input \"1113472456  1030\", expected: invalid, return value NULL,\n    got: valid, tm.tm_gmtoff 37800\n  FAIL: 22223 input strings: 1 fail, 22222 pass","distinct":true,"url":"https://api.github.com/repos/bminor/glibc/commits/be13f5a4baa40af3611208edc77fd588ff2c0fab"},{"sha":"30da407eca459329e060d0412c3fa6710f657e83","author":{"email":"8f3f75c74bd5184edcfa6534cab3c13a00a2f794@gentoo.org","name":"Mike Frysinger"},"message":"de.po: fix SIGALRM typo [BZ #4404]","distinct":true,"url":"https://api.github.com/repos/bminor/glibc/commits/30da407eca459329e060d0412c3fa6710f657e83"},{"sha":"b0e805fa0d6fea33745952df7b7f5442ca4c374f","author":{"email":"8f3f75c74bd5184edcfa6534cab3c13a00a2f794@gentoo.org","name":"Mike Frysinger"},"message":"getmntent: fix memory corruption w/blank lines [BZ #18887]\n\nThe fix for BZ #17273 introduced a single byte of memory corruption when\nthe line is entirely blank.  It would walk back past the start of the\nbuffer if the heap happened to be 0x20 or 0x09 and then write a NUL byte.\n\tbuffer = '\\n';\n\tend_ptr = buffer;\n\twhile (end_ptr[-1] == ' ' || end_ptr[-1] == '\\t')\n\t\tend_ptr--;\n\t*end_ptr = '\\0';\n\nFix that and rework the tests.  Adding the testcase for BZ #17273 to the\nexisting \\040 parser does not really make sense as it's unrelated, and\nleads to confusing behavior: it implicitly relies on the new entry being\nlonger than the previous entry (since it just rewinds the FILE*).  Split\nit out into its own dedicated testcase instead.","distinct":true,"url":"https://api.github.com/repos/bminor/glibc/commits/b0e805fa0d6fea33745952df7b7f5442ca4c374f"},{"sha":"3f563e90e85cb378f9f40e6a10bc50b309b39ab1","author":{"email":"8f3f75c74bd5184edcfa6534cab3c13a00a2f794@gentoo.org","name":"Mike Frysinger"},"message":"NEWS: add #18887","distinct":true,"url":"https://api.github.com/repos/bminor/glibc/commits/3f563e90e85cb378f9f40e6a10bc50b309b39ab1"}]}