Closed GoogleCodeExporter closed 9 years ago
I think this is working as expected. When you send a newline (<crlf>) via
telnet the
server ignores it unless it is expecting a value. In your example foo is set to
"BAR\r\n\r\n\r". So Redis is reporting the correct length of 8, and there is no
buffer overflow.
To validate this yourself. Issue your "cat foo.txt | nc localhost 6379", then
issue
"echo GET foo | nc localhost 6379 > foo2.txt". If you look at this file with
hexdump
you'll see:
00000000 24 38 0d 0a 42 41 52 0d 0a 0d 0a 0d 0d 0a |$8..BAR.......|
There are two starting bytes "$8", then another two bytes, "\r\n". This is then
followed by 8 chars "BAR\r\n\r\n\r", and finally a "\r\n" (which is not part of
the
value).
Original comment by brampton
on 27 Mar 2010 at 3:51
Indeed, there is no bug about that, setting the issue as invalid.
Thanks for reporting, and thanks to brampton for the very informative comment.
Original comment by anti...@gmail.com
on 27 Mar 2010 at 7:33
Original issue reported on code.google.com by
chr...@gmail.com
on 25 Feb 2010 at 2:21