Skip to content

Commit

Permalink
fix: ic0.call_new and ic0.call_on_cleanup do not validate callback (#318
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mraszyk authored Jun 21, 2024
1 parent 1b369a3 commit 2f49b0e
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions spec/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6867,12 +6867,6 @@ ic0.call_new<es>(
callee := copy_from_canister<es>(callee_src, callee_size);
method_name := copy_from_canister<es>(name_src, name_size);
if reply_fun > |es.wasm_state.store.table| then Trap {cycles_used = es.cycles_used;}
if typeof(es.wasm_state.store.table[reply_fun]) ≠ func (anyref, i32) -> () then Trap {cycles_used = es.cycles_used;}
if reject_fun > |es.wasm_state.store.table| then Trap {cycles_used = es.cycles_used;}
if typeof(es.wasm_state.store.table[reject_fun]) ≠ func (anyref, i32) -> () then Trap {cycles_used = es.cycles_used;}
es.pending_call = MethodCall {
callee = callee;
method_name = callee;
Expand All @@ -6887,8 +6881,6 @@ ic0.call_new<es>(
ic0.call_on_cleanup<es> (fun : i32, env : i32) =
if es.context ∉ {U, CQ, Ry, Rt, CRy, CRt, T} then Trap {cycles_used = es.cycles_used;}
if fun > |es.wasm_state.store.table| then Trap {cycles_used = es.cycles_used;}
if typeof(es.wasm_state.store.table[fun]) ≠ func (anyref, i32) -> () then Trap {cycles_used = es.cycles_used;}
if es.pending_call = NoPendingCall then Trap {cycles_used = es.cycles_used;}
if es.pending_call.callback.on_cleanup ≠ NoClosure then Trap {cycles_used = es.cycles_used;}
es.pending_call.callback.on_cleanup := Closure { fun = fun; env = env}
Expand Down

0 comments on commit 2f49b0e

Please sign in to comment.