fc018370

By: ValentinHirschi <valentin.hirschi@gmail.com>

p content digest: an embedded package that names a file twice is refused

The digest of an in-memory package collected its entries into a map, so the
last entry of a name won, while the loader read the first entry of that name.
Such a package could verify against bytes it did not load. A repeated name is
now refused by both: format::unique_memory_names, called by compute_p_content,
by read_p_content and wherever the loader opens the files of a package, in
every content-check mode. Directory packages are unaffected.

Test: content::an_embedded_package_with_a_name_twice_is_refused.

Found by the external review of the skeleton team on e06f4f56d1.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
GitHub
configure