Skip to content

Commit 83524e6

Browse files
authored
Merge pull request #101 from gretchenfrage/fix-backing-array-ub
Fix `BackingArray` undefined behavior
2 parents 0f7d15a + 2f45e19 commit 83524e6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/tree/node_text.rs

+1
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ mod inner {
237237

238238
/// The backing internal buffer type for `NodeText`.
239239
#[derive(Copy, Clone)]
240+
#[repr(transparent)]
240241
struct BackingArray([u8; MAX_BYTES]);
241242

242243
/// We need a very specific size of array, which is not necessarily

0 commit comments

Comments
 (0)