Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix possible use-after-free coming from ‘zmq-message-content’.
‘zmq-message-content’ returns a bytevector that aliases the memory containing message contents. However, until now, the corresponding <zmq-message> record could be GC’d; if user code had kept a reference to the bytevector, said bytevector would now refer to memory that has been freed and potentially reused—a use-after-free bug. This commit fixes that by ensuring that the <zmq-message> record cannot be GC’d before the bytevector itself has been GC’d. * simple-zmq.scm.in (%message-content-table): New variable. (zmq-message-content): Populate it.
- Loading branch information