Package: adplug / 2.2.1+dfsg3-1

CVE-2018-17825.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 19ebb61bf92262dc1868de10ba5a211db249ce76 Mon Sep 17 00:00:00 2001
From: Stas'M <x86corez@gmail.com>
Date: Thu, 4 Oct 2018 00:18:32 +0300
Subject: [PATCH] FMOPL: Avoid double-free by checking OPL pointer (fix #67)

Fixes CVE-2018-17825.
---
 src/fmopl.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/fmopl.c b/src/fmopl.c
index 0cd1d69..1c4485e 100644
--- a/src/fmopl.c
+++ b/src/fmopl.c
@@ -1269,6 +1269,10 @@ FM_OPL *OPLCreate(int type, int clock, int rate)
 /* ----------  Destroy one of vietual YM3812 ----------       */
 void OPLDestroy(FM_OPL *OPL)
 {
+	if(!OPL)
+	{
+		return;
+	}
 #ifdef OPL_OUTPUT_LOG
 	if(opl_dbg_fp)
 	{