aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/inet.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2015-02-18 10:11:53 +0100
committerRaimo Niskanen <[email protected]>2015-02-18 10:11:53 +0100
commitcb5e43872ee5521f75ff66560baccd5562ce93b1 (patch)
tree83d9a1a14a36e173c81b69d482e4596d61a2edeb /lib/kernel/src/inet.erl
parent06b359e3c126804045b9b14852d14b46c2e1fee9 (diff)
downloadotp-cb5e43872ee5521f75ff66560baccd5562ce93b1.tar.gz
otp-cb5e43872ee5521f75ff66560baccd5562ce93b1.tar.bz2
otp-cb5e43872ee5521f75ff66560baccd5562ce93b1.zip
Remove infinite loop in inet:gethostbyname_tm/4
An erroneous lookup option is needed to trigger the bug, and that can only enter the system from a parsed file e.g .inetrc. Pinpointed by Emil Holmström
Diffstat (limited to 'lib/kernel/src/inet.erl')
-rw-r--r--lib/kernel/src/inet.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/kernel/src/inet.erl b/lib/kernel/src/inet.erl
index 43bab8bcf0..ec2c350931 100644
--- a/lib/kernel/src/inet.erl
+++ b/lib/kernel/src/inet.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -1070,7 +1070,7 @@ gethostbyname_tm(Name, Type, Timer, [wins|_]=Opts) ->
gethostbyname_tm_native(Name, Type, Timer, Opts);
gethostbyname_tm(Name, Type, Timer, [native|_]=Opts) ->
gethostbyname_tm_native(Name, Type, Timer, Opts);
-gethostbyname_tm(Name, Type, Timer, [_|_]=Opts) ->
+gethostbyname_tm(Name, Type, Timer, [_|Opts]) ->
gethostbyname_tm(Name, Type, Timer, Opts);
%% Make sure we always can look up our own hostname.
gethostbyname_tm(Name, Type, Timer, []) ->