classification
Title: "aifc" module does not always initialize "Aifc_read._ssnd_chunk"
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.8, Python 3.7, Python 3.6, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ZackerySpytz, Zero, miss-islington, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2017-10-23 13:33 by Zero, last changed 2018-02-21 06:40 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 5240 merged ZackerySpytz, 2018-01-19 07:18
PR 5780 merged miss-islington, 2018-02-20 21:07
PR 5781 merged miss-islington, 2018-02-20 21:08
PR 5782 merged miss-islington, 2018-02-20 21:09
Messages (5)
msg304804 - (view) Author: Stephen Paul Chappell (Zero) Date: 2017-10-23 13:33
When Aifc_read runs initfp, it conditionally sets self._ssnd_chunk and is not guaranteed to do so. At the bottom of the method, a check is made to see if the attribute has a false value; and if so, an error is supposed to be raised. If a SSND chunk is never found, checking self._ssnd_chunk causes an attribute error to be raised similar to this:

AttributeError: 'Aifc_read' object has no attribute '_ssnd_chunk'

The error was found on the following distribution:

Python 3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32
msg312434 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-02-20 21:06
New changeset 80d20b918bd8a882043c493a7f958333ecb41727 by Serhiy Storchaka (Zackery Spytz) in branch 'master':
bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk is not found (#5240)
https://github.com/python/cpython/commit/80d20b918bd8a882043c493a7f958333ecb41727
msg312439 - (view) Author: miss-islington (miss-islington) Date: 2018-02-20 22:07
New changeset 1d927d4feba856cacc026a9167ba38c73a4e7657 by Miss Islington (bot) in branch '3.7':
bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk is not found (GH-5240)
https://github.com/python/cpython/commit/1d927d4feba856cacc026a9167ba38c73a4e7657
msg312441 - (view) Author: miss-islington (miss-islington) Date: 2018-02-20 22:17
New changeset 2b9726eb647e856d83eafdc30cdbbc31a5920ab6 by Miss Islington (bot) in branch '3.6':
bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk is not found (GH-5240)
https://github.com/python/cpython/commit/2b9726eb647e856d83eafdc30cdbbc31a5920ab6
msg312472 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-02-21 06:37
New changeset b852d8c1f0b12e84549d83cd9b1ec0992b9d9703 by Serhiy Storchaka (Miss Islington (bot)) in branch '2.7':
[2.7] bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk is not found (GH-5240) (GH-5781)
https://github.com/python/cpython/commit/b852d8c1f0b12e84549d83cd9b1ec0992b9d9703
History
Date User Action Args
2018-02-21 06:40:02serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-02-21 06:37:20serhiy.storchakasetmessages: + msg312472
2018-02-20 22:17:32miss-islingtonsetmessages: + msg312441
2018-02-20 22:07:08miss-islingtonsetnosy: + miss-islington
messages: + msg312439
2018-02-20 21:09:19miss-islingtonsetpull_requests: + pull_request5562
2018-02-20 21:08:21miss-islingtonsetpull_requests: + pull_request5561
2018-02-20 21:07:23miss-islingtonsetpull_requests: + pull_request5560
2018-02-20 21:06:13serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg312434
2018-02-20 02:55:39ZackerySpytzsetnosy: + ZackerySpytz

type: crash -> behavior
components: - Tests
versions: + Python 2.7, Python 3.7, Python 3.8
2018-01-19 07:18:03ZackerySpytzsetkeywords: + patch
stage: patch review
pull_requests: + pull_request5086
2017-10-23 13:33:01Zerocreate