https://bugs.documentfoundation.org/show_bug.cgi?id=166195
--- Comment #10 from gplhust...@gmail.com --- (In reply to Mike Kaganski from comment #9) I’m not familiar with specific calendar types, but as I understand it, XCalendar is an abstraction interface implemented by concrete calendar systems. ImplGetYear appears to be a generic method designed for all calendar types, meaning it should only handle general functionality. During gdb debugging, when I input a string like "-8000-1-1", the "-" is treated as a sign, making nLen equal to 4, and it doesn’t count as part of nYear. In this case, temp will always remain positive. However, I’m unsure if this behavior applies to all cases. If all cases behave similarly, there may be no need to change the method’s signature—hopefully, the original developer accounted for this when choosing u16. To address potential issues, the best we can do is prevent u16 overflow by capping nYear (e.g., setting it to 0 in cases of invalid positive overflow). -- You are receiving this mail because: You are the assignee for the bug.