Compare commits

...
5 Commits
Author SHA1 Message Date
Alessandro Ghedini 40cd8867f1 Release 0.5.4 2014-09-23 21:21:41 +02:00
wm4 1a7b6f1810 audio: fix random crashes on uninit
I added this non-sense earlier this day. Oops.
2014-09-23 21:09:05 +02:00
wm4 6f7f7c3e2e player: don't let multiline filenames set options on resume
If --write-filename-in-watch-later-config is used, and the filename
contains newline characters (as generally allowed on Unix), then the
newline will be written to the resume file literally, and the parts
after the newline character are interpreted as options.

This is possibly security relevant.

Change newline characters (and in fact any other special characters)
to '_'.

Reported as #1099 (this commit is a reimplementation of the proposed
pull request).

CC: @mpv-player/stable
2014-09-23 21:08:54 +02:00
Alessandro Ghedini 5b6a67bf76 Release 0.5.3 2014-09-10 19:34:45 +02:00
Alessandro Ghedini 41f2ad33e5 player: fix build
This fixes a build failure introduced by c269fa1.
2014-09-10 19:32:54 +02:00
5 changed files with 37 additions and 8 deletions

No files matched your search

+27
View File
@@ -1,3 +1,30 @@
Release 0.5.4
=============
Bug fixes
---------
- Fix generation of watch later config file for multiline file names when
--write-filename-in-watch-later-config is used (avoid writing the new lines
in the config, which would make it possible for the filename to set options).
- Fix random crashes on audio uninit.
This listing is not complete. There are many more bug fixes and changes. The
complete change log can be viewed by running ``git log 6f7f7c3..1a7b6f1`` in
the git repository.
Release 0.5.3
=============
Bug fixes
---------
- Fix build failure introduced by the previous release.
This listing is not complete. There are many more bug fixes and changes. The
complete change log can be viewed by running ``git log 41f2ad3..41f2ad3`` in
the git repository.
Release 0.5.2
=============
+1 -1
View File
@@ -1 +1 @@
0.5.2
0.5.4
+7 -4
View File
@@ -287,8 +287,7 @@ void mp_write_watch_later_conf(struct MPContext *mpctx)
mp_mk_config_dir(mpctx->global, MP_WATCH_LATER_CONF);
conffile = mp_get_playback_resume_config_filename(mpctx->global,
mpctx->filename);
conffile = mp_get_playback_resume_config_filename(mpctx->global, filename);
if (!conffile)
goto exit;
@@ -297,8 +296,12 @@ void mp_write_watch_later_conf(struct MPContext *mpctx)
FILE *file = fopen(conffile, "wb");
if (!file)
goto exit;
if (mpctx->opts->write_filename_in_watch_later_config)
fprintf(file, "# %s\n", mpctx->filename);
if (mpctx->opts->write_filename_in_watch_later_config) {
char write_name[1024] = {0};
for (int n = 0; filename[n] && n < sizeof(write_name) - 1; n++)
write_name[n] = (unsigned char)filename[n] < 32 ? '_' : filename[n];
fprintf(file, "# %s\n", write_name);
}
fprintf(file, "start=%f\n", pos);
for (int i = 0; backup_properties[i]; i++) {
const char *pname = backup_properties[i];
+1 -2
View File
@@ -87,10 +87,9 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask)
audio_uninit(mpctx->d_audio);
mpctx->d_audio = NULL;
talloc_free(mpctx->ao_buffer);
mpctx->ao_buffer = NULL;
mpctx->audio_status = STATUS_EOF;
reselect_demux_streams(mpctx);
if (mpctx->ao_buffer)
mp_audio_buffer_clear(mpctx->ao_buffer);
}
if (mask & INITIALIZED_SUB) {
+1 -1
View File
@@ -903,7 +903,7 @@ void run_playloop(struct MPContext *mpctx)
* other hand, if we don't have a video frame, then the user probably seeked
* outside of the video, and we do want to quit. */
bool prevent_eof =
mpctx->paused && mpctx->video_out && vo_has_frame(mpctx->video_out);
mpctx->paused && mpctx->video_out && mpctx->video_out->hasframe;
/* Handles terminating on end of playback (or switching to next segment).
*
* It's possible for the user to simultaneously switch both audio