Closed shearer12345 closed 1 year ago
link for MS-CFB docs for reference - https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cfb/53989ce4-7b05-4f8d-829b-d08d6148375b
Good catch! When we tested at the time, Excel happily accepted files with 32 UTF-16 characters without a null terminator, but it makes more sense to use the lower limit. Changing 32 -> 31 works. Also make the change in bits/66_dir.js
Thanks for js-cfb, and for the changes to truncate stream names introduced in 0e33eb6e.
The MS-CFB spec says
Currently, cfb.js truncates stream name to 32 characters, but as the name has to be null terminated, it should be truncated to 31, allowing
WriteShift
to pad the rest with0
.So, in cfb.js#894
all the 32s should be 31.
In my testing this doesn't break any of my tools, but some throw warnings:
I can submit a PR for this if you'd like