File CVE-2017-18207.patch of Package python (Revision 381d91ea0ab10fc5235c75951d42564a)
Currently displaying revision 381d91ea0ab10fc5235c75951d42564a , Show latest
23
1
From ae0ed14794ced2c51c822fc6f0d3ca92064619dd Mon Sep 17 00:00:00 2001
2
From: BT123 <abcdyzhang@163.com>
3
Date: Fri, 17 Nov 2017 16:45:45 +0800
4
Subject: [PATCH] bug in wave.py
5
6
---
7
Lib/wave.py | 2 ++
8
1 file changed, 2 insertions(+)
9
10
Index: Python-2.7.13/Lib/wave.py
11
===================================================================
12
--- Python-2.7.13.orig/Lib/wave.py 2018-06-07 17:00:25.370728844 +0000
13
+++ Python-2.7.13/Lib/wave.py 2018-06-07 17:02:51.768202800 +0000
14
15
self._sampwidth = (sampwidth + 7) // 8
16
else:
17
raise Error, 'unknown format: %r' % (wFormatTag,)
18
+ if self._nchannels == 0:
19
+ raise Error, "The audio file in wav format should have at least one channel!"
20
self._framesize = self._nchannels * self._sampwidth
21
self._comptype = 'NONE'
22
self._compname = 'not compressed'
23