summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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.