| 159 | } |
| 160 | |
| 161 | class Chain800Base extends ChainBase { |
| 162 | push_end() { |
| 163 | this.push_gadget("leave; ret"); |
| 164 | } |
| 165 | |
| 166 | push_get_retval() { |
| 167 | this.push_gadget("pop rdi; ret"); |
| 168 | this.push_value(this.retval_addr); |
| 169 | this.push_gadget("mov qword ptr [rdi], rax; ret"); |
| 170 | } |
| 171 | |
| 172 | push_get_errno() { |
| 173 | this.push_gadget("pop rdi; ret"); |
| 174 | this.push_value(this.errno_addr); |
| 175 | |
| 176 | this.push_call(this.get_gadget("__error")); |
| 177 | |
| 178 | this.push_gadget("mov rax, qword ptr [rax]; ret"); |
| 179 | this.push_gadget("mov dword ptr [rdi], eax; ret"); |
| 180 | } |
| 181 | |
| 182 | push_clear_errno() { |
| 183 | this.push_call(this.get_gadget("__error")); |
| 184 | this.push_gadget("pop rsi; ret"); |
| 185 | this.push_value(0); |
| 186 | this.push_gadget("mov dword ptr [rax], esi; ret"); |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | export class Chain800 extends Chain800Base { |
| 191 | constructor() { |
nothing calls this directly
no outgoing calls
no test coverage detected