diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-11-21 15:44:31 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-11-21 15:44:31 -0800 |
commit | 36f35fa226d028533f64e49eafbdcd829b1d7ec1 (patch) | |
tree | aa8c991d6e4c13624bcc0c9cc4c1f31105d559ec /src | |
parent | ad30f7a72803f09c39ffc6fcac8486bec97cf682 (diff) |
modules/playit: tomix must be signed to handle negatives
This can potentially be negative depending on what n_queued
returns, and the early-exit comparison considered that by using
<= 0 but size_t is unsigned, so it just wraps around then
segfaults in the Very Large Copy attempt.
Trivial fix, interestingly discovered during windows testing
where the SDL driver was readily causing this to go negative - it
never happend in linux testing.
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/playit/playit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/playit/playit.c b/src/modules/playit/playit.c index e70a631..638c147 100644 --- a/src/modules/playit/playit.c +++ b/src/modules/playit/playit.c @@ -115,7 +115,7 @@ static void playit_render_audio(til_module_context_t *context, til_stream_t *str { playit_context_t *ctxt = (playit_context_t *)context; playit_setup_t *s = (playit_setup_t *)context->setup; - size_t tomix = s->bufsize; + ssize_t tomix = s->bufsize; unsigned frame, frames; if (ctxt->paused) |