Open attachment 203900 [details] (from bug 169403). It is created in Writer. I Writer, its page's height is ~6000 mm In Word, it's small (maybe locale-specific? I see ~220 mm). [MS-OI29500] specifies in 2.1.220 Part 1 Section 17.6.13, pgSz (Page Size): > The standard states that the h and w attributes can have any value in the range > 0 to 4294967295, inclusive. > > Word requires that this value is between the width of the page margins (and any > column widths, for the w attribute) and 31680 (22 inches). The actual markup in the document is '<w:pgSz w:w="17008" w:h="340157"/>', with the 'h' attribute more than 10 times greater than the maximum.
See [MS-OI29500]: Office Implementation Information for ISO/IEC 29500 Standards Support at https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oi29500/1fd4a662-8623-49c0-82f0-18fa91b413b8
Curiously, Word can open a document with page size 115x115 cm as is, but 116x116 cm overflows and becomes 0.4x0.4 cm.
(In reply to Aron Budea from comment #2) > Word can open a document with page size 115x115 cm as is, but > 116x116 cm overflows and becomes 0.4x0.4 cm. 115 cm = 65196.85 twip 116 cm = 65763.78 twip So obviously, there is unsigned 16-bit overflow. 65535 twip = 115.6 cm ~ 116 cm - 0.4 cm
Aron Budea committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/714c2ee044b31f6974cbedc3f8cb3f80db475afc tdf#142693 tdf#169419 sw: Limit page size exported to DOCX It will be available in 26.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Aron Budea committed a patch related to this issue. It has been pushed to "libreoffice-26-2": https://git.libreoffice.org/core/commit/47df7f0b5c7509b084ee6916a9c98283e54332a2 tdf#142693 tdf#169419 sw: Limit page size exported to DOCX It will be available in 26.2.0.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Aron Budea committed a patch related to this issue. It has been pushed to "libreoffice-25-8": https://git.libreoffice.org/core/commit/8ff6697fd22764f2b72fc2086fc021fba8965ff7 tdf#142693 tdf#169419 sw: Limit page size exported to DOCX It will be available in 25.8.5. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.