Skip to content

Commit

Permalink
machinarium/sources/tls.c: fix SIGSEGV (#725)
Browse files Browse the repository at this point in the history
mm_tls_read can have io without on_read

Signed-off-by: rkhapov <[email protected]>
Co-authored-by: rkhapov <[email protected]>
  • Loading branch information
rkhapov and rkhapov authored Dec 10, 2024
1 parent 9ea042d commit 8dc89ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion third_party/machinarium/sources/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ int mm_tls_read(mm_io_t *io, char *buf, int size)
int rc;
rc = SSL_read(io->tls_ssl, buf, size);
if (rc > 0) {
if (mm_tls_read_pending(io)) {
if (io->on_read != NULL && mm_tls_read_pending(io)) {
mm_cond_signal((mm_cond_t *)io->on_read,
&mm_self->scheduler);
}
Expand Down

0 comments on commit 8dc89ce

Please sign in to comment.