summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-01-17 13:31:33 (GMT)
committerGitHub <noreply@github.com>2024-01-17 13:31:33 (GMT)
commit00e77935193221f1601405587b9ec05c14c13284 (patch)
tree28d9a13660a50ff54eb673fec3edeaa162fcf57f /Modules
parent27941b14ab9ecdb88fe2ced68b50fa428c2ea8f2 (diff)
downloadcpython-00e77935193221f1601405587b9ec05c14c13284.zip
cpython-00e77935193221f1601405587b9ec05c14c13284.tar.gz
cpython-00e77935193221f1601405587b9ec05c14c13284.tar.bz2
[3.12] gh-104282: Fix null pointer dereference in `lzma._decode_filter_properties` (GH-104283) (GH-114181)
(cherry picked from commit 0154405350c272833bd51f68138223655e142a37) Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_lzmamodule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_lzmamodule.c b/Modules/_lzmamodule.c
index e34fbad..7bbd656 100644
--- a/Modules/_lzmamodule.c
+++ b/Modules/_lzmamodule.c
@@ -494,7 +494,9 @@ build_filter_spec(const lzma_filter *f)
case LZMA_FILTER_ARMTHUMB:
case LZMA_FILTER_SPARC: {
lzma_options_bcj *options = f->options;
- ADD_FIELD(options, start_offset);
+ if (options) {
+ ADD_FIELD(options, start_offset);
+ }
break;
}
default: