we (web engine): Experimental web browser project to understand the limits of Claude
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Validate data slice length before Metal texture upload

Prevents potential out-of-bounds read by checking that the data slice
is at least bytes_per_row * height before passing it to Metal's
replaceRegion:withBytes:bytesPerRow: API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+5
+5
crates/platform/src/metal.rs
··· 569 569 return None; 570 570 } 571 571 572 + let required = bytes_per_row as usize * height as usize; 573 + if data.len() < required { 574 + return None; 575 + } 576 + 572 577 let cls = class!("MTLTextureDescriptor")?; 573 578 let desc: *mut c_void = msg_send![ 574 579 cls.as_ptr(),