diff options
author | Sverker Eriksson <[email protected]> | 2016-04-13 15:18:13 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-04-13 15:26:42 +0200 |
commit | 97cdb6bd87f38b06ee477dbb17d4d2f7854b21e1 (patch) | |
tree | bbe978292aceb8c0223879c7208235d6a3c2b1bd /erts/emulator/beam | |
parent | 5e1b5ef47f3f2b898d30e0425823835bd9a574d4 (diff) | |
download | otp-97cdb6bd87f38b06ee477dbb17d4d2f7854b21e1.tar.gz otp-97cdb6bd87f38b06ee477dbb17d4d2f7854b21e1.tar.bz2 otp-97cdb6bd87f38b06ee477dbb17d4d2f7854b21e1.zip |
erts: Fix bug in open_port with {args,ImproperList}
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/erl_bif_port.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_bif_port.c b/erts/emulator/beam/erl_bif_port.c index 27c24197ea..e4d4559f48 100644 --- a/erts/emulator/beam/erl_bif_port.c +++ b/erts/emulator/beam/erl_bif_port.c @@ -953,6 +953,8 @@ static char **convert_args(Eterm l) } n = erts_list_length(l); + if (n < 0) + return NULL; /* We require at least one element in argv[0] + NULL at end */ pp = erts_alloc(ERTS_ALC_T_TMP, (n + 2) * sizeof(char **)); pp[i++] = erts_default_arg0; |