summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Watson <tim@rabbitmq.com>2012-10-30 16:33:48 +0000
committerTim Watson <tim@rabbitmq.com>2012-10-30 16:33:48 +0000
commit97213c7634ffe082b8796d6ae3f17b532e6292a4 (patch)
treeed0368eb57456eba2ee7a97cc312aaf53a6374fe /src
parentdb0518cb26c6f1bd87708829ed4b24ba017a679e (diff)
downloadrabbitmq-server-git-97213c7634ffe082b8796d6ae3f17b532e6292a4.tar.gz
verify the basic.expiration >= 0
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_misc.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl
index 7d3fb0ad39..4dff62f0a4 100644
--- a/src/rabbit_misc.erl
+++ b/src/rabbit_misc.erl
@@ -982,5 +982,7 @@ term_to_json(V) when is_binary(V) orelse is_number(V) orelse V =:= null orelse
check_expiry_size(N) when N > ?MAX_EXPIRY_TIMER ->
{error, {value_too_big, N}};
+check_expiry_size(N) when N < 0 ->
+ {error, {negative_value, N}};
check_expiry_size(N) ->
ok.