Skip to content

more doc infrastructure#504

Merged
andiwand merged 15 commits into
mainfrom
doc-infrastructure
Jun 7, 2026
Merged

more doc infrastructure#504
andiwand merged 15 commits into
mainfrom
doc-infrastructure

Conversation

@andiwand
Copy link
Copy Markdown
Member

@andiwand andiwand commented Apr 6, 2026

No description provided.

@andiwand andiwand changed the title doc infrastructure more doc infrastructure Jun 7, 2026
@andiwand andiwand marked this pull request as ready for review June 7, 2026 13:23
@andiwand andiwand merged commit 7e98e1d into main Jun 7, 2026
11 checks passed
@andiwand andiwand deleted the doc-infrastructure branch June 7, 2026 13:23
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

return std::unique_ptr<FibRgFcLcb97>(
reinterpret_cast<FibRgFcLcb97 *>(fibRgFcLcb.release()));

P1 Badge Preserve the array allocation when storing FIB data

This converts memory allocated by std::make_unique<char[]> into a std::unique_ptr<FibRgFcLcb97>, so when ParsedFib is destroyed after parsing any legacy Word document, the default deleter uses delete on storage that was allocated with new[]. That is undefined behavior and can corrupt the heap during ordinary .doc parsing; the storage needs an owning type/deleter that matches the allocation or a properly constructed struct object.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +42 to +46
if (files.is_file(AbsPath("/EncryptionInfo")) &&
files.is_file(AbsPath("/EncryptedPackage"))) {
result.type = FileType::office_open_xml_encrypted;
result.password_encrypted = true;
return result;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep encrypted OOXML out of the legacy handler

When a password-protected .docx/.xlsx/.pptx is a CFB with /EncryptionInfo and /EncryptedPackage, open_strategy tries LegacyMicrosoftFile before OfficeOpenXmlFile; this new branch now succeeds there and returns a LegacyMicrosoftFile, whose decrypt() always throws the legacy unsupported-operation error. Before this change, legacy detection failed and the same file fell through to the OOXML handler that implements decryption, so encrypted OOXML files are no longer decryptable through normal auto-open.

Useful? React with 👍 / 👎.

andiwand added a commit that referenced this pull request Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant