open-standards/wai/http-conformance/falsify/manifest-values-uncounted.patch
2026-10-11 23:33:42 -04:00

15 lines
854 B
Diff

# must fail: head_malformed_manifest_too_many_values_O5 head_malformed_manifest_too_many_values_OD
# a manifest past the value limit is built, not refused (container::read_tree)
diff --git a/wai/wai-rs/src/container.rs b/wai/wai-rs/src/container.rs
index b7b223f0..a06a74fd 100644
--- a/wai/wai-rs/src/container.rs
+++ b/wai/wai-rs/src/container.rs
@@ -1706,7 +1706,7 @@ fn read_tree(text: &[u8]) -> Result<Value, serde_json::Error> {
use serde::de::{DeserializeSeed, Deserializer, MapAccess, SeqAccess, Visitor};
use std::cell::{Cell, RefCell};
let sizes = RefCell::new(Vec::new());
- scan_json(text, MANIFEST_MAX_VALUES, Some(&sizes))?;
+ scan_json(text, usize::MAX, Some(&sizes))?;
let mut sizes = sizes.into_inner();
sizes.shrink_to_fit();
/// One value of the tree; `at` is the next container's index in `sizes`.