@@ -41,7 +41,7 @@ library SafeTransferLib {
41
41
revert (ptr, returndatasize ())
42
42
}
43
43
// Check for short returndata and missing code
44
- if iszero (gt ( returndatasize (), 0x1f )) { revert (0x00 , 0x00 ) }
44
+ if iszero (lt ( 0x1f , returndatasize ())) { revert (0x00 , 0x00 ) }
45
45
46
46
r := mload (0x00 )
47
47
}
@@ -64,7 +64,7 @@ library SafeTransferLib {
64
64
}
65
65
// We check that the call either returned exactly 1 [true] (can't just be non-zero
66
66
// data), or had no return data.
67
- if iszero (or (and (eq (mload (0x00 ), 0x01 ), gt ( returndatasize (), 0x1f )), iszero (returndatasize ()))) {
67
+ if iszero (or (and (eq (mload (0x00 ), 0x01 ), lt ( 0x1f , returndatasize ())), iszero (returndatasize ()))) {
68
68
mstore (0x00 , 0x7939f424 ) // Selector for `TransferFromFailed()`
69
69
revert (0x1c , 0x04 )
70
70
}
@@ -92,7 +92,7 @@ library SafeTransferLib {
92
92
}
93
93
// We check that the call either returned exactly 1 [true] (can't just be non-zero
94
94
// data), or had no return data.
95
- if iszero (or (and (eq (mload (0x00 ), 0x01 ), gt ( returndatasize (), 0x1f )), iszero (returndatasize ()))) {
95
+ if iszero (or (and (eq (mload (0x00 ), 0x01 ), lt ( 0x1f , returndatasize ())), iszero (returndatasize ()))) {
96
96
mstore (0x00 , 0x90b8ec18 ) // Selector for `TransferFailed()`
97
97
revert (0x1c , 0x04 )
98
98
}
@@ -119,7 +119,7 @@ library SafeTransferLib {
119
119
}
120
120
// We check that the call either returned exactly 1 [true] (can't just be non-zero
121
121
// data), or had no return data.
122
- if iszero (or (and (eq (mload (0x00 ), 0x01 ), gt ( returndatasize (), 0x1f )), iszero (returndatasize ()))) {
122
+ if iszero (or (and (eq (mload (0x00 ), 0x01 ), lt ( 0x1f , returndatasize ())), iszero (returndatasize ()))) {
123
123
mstore (0x00 , 0x3e3f8f73 ) // Selector for `ApproveFailed()`
124
124
revert (0x1c , 0x04 )
125
125
}
0 commit comments