diff options
author | Adam Weinberger <adamw@FreeBSD.org> | 2008-06-25 04:25:32 +0000 |
---|---|---|
committer | Adam Weinberger <adamw@FreeBSD.org> | 2008-06-25 04:25:32 +0000 |
commit | 65a85408e3594d29c63697b229e4a33a8aa6a7bc (patch) | |
tree | e2dd36f94ce42ea8685986cf010e7f362e351def /audio/mp3splt/files/patch-mp3splt.c | |
parent | - Update to 2.0 (diff) |
Add a fix to prevent a segfault when an mp3 file is followed by a
Vorbis file.
Transfer maintainership to the submitter, at the request of the
previous maintainer.
PR: ports/124616
Submitted by: Fabian Keil <fk@fabiankeil.de>
Approved by: Original maintainer (uspoerlein@mgail.com)
Diffstat (limited to 'audio/mp3splt/files/patch-mp3splt.c')
-rw-r--r-- | audio/mp3splt/files/patch-mp3splt.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/audio/mp3splt/files/patch-mp3splt.c b/audio/mp3splt/files/patch-mp3splt.c new file mode 100644 index 000000000000..323aee6be945 --- /dev/null +++ b/audio/mp3splt/files/patch-mp3splt.c @@ -0,0 +1,16 @@ +--- mp3splt.c.orig 2008-06-25 00:19:32.000000000 -0400 ++++ mp3splt.c 2008-06-25 00:20:37.000000000 -0400 +@@ -114,6 +114,13 @@ + if (state->mstate) { + fclose(state->mstate->file_input); + mp3_state_free(state->mstate); ++ /* ++ * Explicitly setting mstate to NULL ++ * prevents encoding misdetection (resulting ++ * in a crash) if an mp3 file is followed by ++ * a vorbis file. ++ */ ++ state->mstate = NULL; + } + #ifndef NO_OGG + else if (state->ostate) { // If file has been opened with ov_open we should close it using ov_clear() |