summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@lshift.net>2010-05-15 11:36:00 +0100
committerMatthias Radestock <matthias@lshift.net>2010-05-15 11:36:00 +0100
commit57bbfb01fa226539b780958a146505c315c0da08 (patch)
tree3bc9f40a061433045f136d068a97cec1ea713b15 /src
parent5f34d8fdcfa3af18bb27bf2555ed05e1fe71a4d1 (diff)
downloadrabbitmq-server-git-57bbfb01fa226539b780958a146505c315c0da08.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')
-rw-r--r--src/rabbit_msg_file.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rabbit_msg_file.erl b/src/rabbit_msg_file.erl
index dca18e48dd..fc9368a119 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,