[New-bugs-announce] [issue21390] strdup may cause Segment Fault on Android
Li Zhenhua
report at bugs.python.org
Wed Apr 30 09:33:43 CEST 2014
New submission from Li Zhenhua:
On Android platform, when run "python" command without any scripts, it may crash, get an error message "Segment Fault". This is because strdup with a NULL pointer.
Details:
In file
Modules/readline.c,
function
static void setup_readline(void)
This line:
char *saved_locale = strdup(setlocale(LC_CTYPE, NULL));
When running on an Android platform, setlocale(LC_CTYPE, NULL) returns NULL, and this causes strdup with a NULL pointer, then Segment Fault occurs.
----------
components: Cross-Build
files: strdup.patch
keywords: patch
messages: 217580
nosy: lizhenhua.dev
priority: normal
severity: normal
status: open
title: strdup may cause Segment Fault on Android
versions: Python 3.5
Added file: http://bugs.python.org/file35105/strdup.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21390>
_______________________________________
More information about the New-bugs-announce
mailing list