File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -88,8 +88,6 @@ impl<'a> Segment<'a> {
88
88
& self ,
89
89
shlib : & SharedLibrary < ' a > ,
90
90
) -> impl Iterator < Item = ( libc:: Elf32_Word , & ' a [ u8 ] , & ' a [ u8 ] ) > {
91
- assert ! ( self . is_note( ) ) ;
92
-
93
91
// `man 5 readelf` says that all of the `Nhdr`, name, and descriptor are
94
92
// always 4-byte aligned, but we copy this alignment behavior from
95
93
// `readelf` since that seems to match reality in practice.
@@ -113,7 +111,9 @@ impl<'a> Segment<'a> {
113
111
let mut data = self . data ( shlib) ;
114
112
115
113
iter:: from_fn ( move || {
116
- assert_eq ! ( data. as_ptr( ) as usize % alignment, 0 ) ;
114
+ if ( data. as_ptr ( ) as usize % alignment) != 0 {
115
+ return None ;
116
+ }
117
117
118
118
// Each entry in a `PT_NOTE` segment begins with a
119
119
// fixed-size header `Nhdr`.
You can’t perform that action at this time.
0 commit comments