Skip to content

Commit

Permalink
Ensure stack safety in StoreConnectionHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
Affonso-Gui committed Nov 4, 2022
1 parent 7877b00 commit 8bb1082
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion roseus/roseus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ void StoreConnectionHeader(EuslispMessage *eus_msg) {
return;
}
context *ctx = current_ctx;
vpush(eus_msg->_message);
// store conection headers
register pointer ret, header;
ret = cons(ctx, NIL, NIL);
Expand All @@ -323,7 +324,8 @@ void StoreConnectionHeader(EuslispMessage *eus_msg) {
/* (setslot obj class index newval) */
pointer slot_args[4] = {eus_msg->_message, classof(eus_msg->_message), K_ROSEUS_CONNECTION_HEADER, ccdr(header)};
SETSLOT(ctx, 4, slot_args);
vpop();
vpop(); // ret
vpop(); // eus_msg->_message
}

namespace ros{
Expand Down

0 comments on commit 8bb1082

Please sign in to comment.