diff options
author | Nadeem Vawda <nadeem.vawda@gmail.com> | 2013-10-28 21:41:24 +0100 |
---|---|---|
committer | Nadeem Vawda <nadeem.vawda@gmail.com> | 2013-10-28 21:41:24 +0100 |
commit | acf010d6b83e6ee4bc916a61b04938f2f4205810 (patch) | |
tree | 20104eff0d9561d62fc9f538a7882d7b98e00ac1 /Python/strdup.c | |
parent | 284a788ebc97e88858f9299669470438dcf0ebfb (diff) | |
parent | c3408df66ec4dbebcbbfc283cebd9736d97f5f1c (diff) | |
download | cpython-acf010d6b83e6ee4bc916a61b04938f2f4205810.tar.gz |
#19395: Raise exception when pickling a (BZ2|LZMA)(Compressor|Decompressor).
The underlying C libraries provide no mechanism for serializing compressor and
decompressor objects, so actually pickling these classes is impractical.
Previously, these objects would be pickled without error, but attempting to use
a deserialized instance would segfault the interpreter.
Diffstat (limited to 'Python/strdup.c')
-rw-r--r-- | Python/strdup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/strdup.c b/Python/strdup.c index 20187e0f0a..769d3db130 100644 --- a/Python/strdup.c +++ b/Python/strdup.c @@ -6,7 +6,7 @@ char * strdup(const char *str) { if (str != NULL) { - register char *copy = malloc(strlen(str) + 1); + char *copy = malloc(strlen(str) + 1); if (copy != NULL) return strcpy(copy, str); } |