diff options
| author | Tim Watson <tim@rabbitmq.com> | 2012-10-30 16:33:48 +0000 |
|---|---|---|
| committer | Tim Watson <tim@rabbitmq.com> | 2012-10-30 16:33:48 +0000 |
| commit | 97213c7634ffe082b8796d6ae3f17b532e6292a4 (patch) | |
| tree | ed0368eb57456eba2ee7a97cc312aaf53a6374fe | |
| parent | db0518cb26c6f1bd87708829ed4b24ba017a679e (diff) | |
| download | rabbitmq-server-git-97213c7634ffe082b8796d6ae3f17b532e6292a4.tar.gz | |
verify the basic.expiration >= 0
| -rw-r--r-- | src/rabbit_misc.erl | 2 |
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. |
