]> git.tuebingen.mpg.de Git - paraslash.git/commit
vss: Reset afhi.chunks_total on eof.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 19 Mar 2022 22:48:18 +0000 (23:48 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 27 Mar 2022 18:05:27 +0000 (20:05 +0200)
commit1bf98a8af7ed3a0538e8547d8c210c26f8253178
tree17f0f44f9d60d47375e509646c29c66573d84e7b
parent19c6002ccd47b720b53410d0cbbecdae6ba80223
vss: Reset afhi.chunks_total on eof.

Without this, the server can be crashed by running

para_client nomore # set the nomore flag
# wait for eof
para_client jmp 50 # set the repos flag, clear the next flag
para_client play # boom

The problem is that the command handler of the jmp command checks
afhi.chunks_total to determine if some audio file is currently
open. Since vss_eof() did not reset chunks_total, the command handler
wrongly believes that there is an open audio file, sets the repos
flag and clears the next flag. When streaming is resumed later, the
virtual streaming system attempts to access the chunk table which
was freed earlier in vss_eof().
vss.c