diff options
author | Matthias Radestock <matthias@lshift.net> | 2010-05-15 11:36:00 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@lshift.net> | 2010-05-15 11:36:00 +0100 |
commit | 52151a09e258c78d8b0bd0dab9ee9808ae8727fa (patch) | |
tree | 3bc9f40a061433045f136d068a97cec1ea713b15 /src/rabbit_msg_file.erl | |
parent | d8d9d29a281ffd9f041bc604c86253c86ae3f6cd (diff) | |
download | rabbitmq-server-52151a09e258c78d8b0bd0dab9ee9808ae8727fa.tar.gz |
tighten guid size check on 'append'
the guid must be *exactly* the right size; the rest of the code will
break if it isn't.
Diffstat (limited to 'src/rabbit_msg_file.erl')
-rw-r--r-- | src/rabbit_msg_file.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rabbit_msg_file.erl b/src/rabbit_msg_file.erl index dca18e48..fc9368a1 100644 --- a/src/rabbit_msg_file.erl +++ b/src/rabbit_msg_file.erl @@ -67,7 +67,7 @@ %%---------------------------------------------------------------------------- append(FileHdl, Guid, MsgBody) - when is_binary(Guid) andalso size(Guid) =< ?GUID_SIZE_BYTES -> + when is_binary(Guid) andalso size(Guid) =:= ?GUID_SIZE_BYTES -> MsgBodyBin = term_to_binary(MsgBody), MsgBodyBinSize = size(MsgBodyBin), Size = MsgBodyBinSize + ?GUID_SIZE_BYTES, |