https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212983
Bug ID: 212983 Summary: strptime(3) doesn't increment pointer on parsing '%w' (weekday) Product: Base System Version: 11.0-RC1 Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: gre...@freebsd.org Created attachment 175152 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=175152&action=edit Patch to increment buf on parsing 'w' strptime has a long standing bug that makes it fail to parse "%w" properly. E.g.: printf("%s", strptime("1970/01/01 00:00:00 4 UTC 123", "%Y/%m/%d %T %w UTC", &tm)); Expected output: 123 Actual output: 4123 or printf("%i", (int)strptime("4 1970", "%w %Y", &tm)); Expected output: Something >0 Actual output: 0 The attached patch aims to fix this problem. Thanks to Nikola Kolev for reporting this problem. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-bugs@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"