File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -396,7 +396,7 @@ impl<'a> Match<'a> {
396
396
ScanResultsData :: Continuous ( scanned_data) => {
397
397
scanned_data. as_ref ( ) . get ( self . inner . range . clone ( ) ) . unwrap ( )
398
398
}
399
- ScanResultsData :: Fragmeneted ( sparse_data) => {
399
+ ScanResultsData :: Fragmented ( sparse_data) => {
400
400
sparse_data. get ( self . inner . range . clone ( ) ) . unwrap ( )
401
401
}
402
402
}
Original file line number Diff line number Diff line change @@ -1115,7 +1115,7 @@ impl<'r> Scanner<'r> {
1115
1115
match func_result {
1116
1116
Ok ( 0 ) => Ok ( ScanResults :: new (
1117
1117
self . wasm_store . data ( ) ,
1118
- ScanResultsData :: Fragmeneted ( sparse_scanned_data) ,
1118
+ ScanResultsData :: Fragmented ( sparse_scanned_data) ,
1119
1119
) ) ,
1120
1120
Ok ( v) => panic ! ( "WASM main returned: {}" , v) ,
1121
1121
Err ( err) if err. is :: < ScanError > ( ) => {
@@ -1268,7 +1268,7 @@ pub enum ScanResultsData<'a> {
1268
1268
// overlaps then this is a waste).
1269
1269
// TODO: if a significant part of the fragment matched then it might be better to just save the
1270
1270
// whole of it.
1271
- Fragmeneted ( FragmentedData ) ,
1271
+ Fragmented ( FragmentedData ) ,
1272
1272
}
1273
1273
1274
1274
/// Results of a scan operation.
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ impl Mapping {
57
57
if ( libc:: major ( dev) != self . dmaj as u32 )
58
58
|| ( libc:: minor ( dev) != self . dmin as u32 )
59
59
|| ( meta. ino ( ) != self . inode )
60
- || ( meta. size ( ) < self . offset )
60
+ || ( meta. size ( ) < ( self . offset + self . end - self . begin ) )
61
61
|| ( ( meta. mode ( ) & libc:: S_IFMT ) != libc:: S_IFREG )
62
62
{
63
63
return None ;
@@ -71,7 +71,7 @@ impl Mapping {
71
71
if ( libc:: major ( dev) != self . dmaj as u32 )
72
72
|| ( libc:: minor ( dev) != self . dmin as u32 )
73
73
|| ( meta. ino ( ) != self . inode )
74
- || ( meta. size ( ) < self . offset )
74
+ || ( meta. size ( ) < ( self . offset + self . end - self . begin ) )
75
75
|| ( ( meta. mode ( ) & libc:: S_IFMT ) != libc:: S_IFREG )
76
76
{
77
77
return None ;
You can’t perform that action at this time.
0 commit comments