From: Tommi Virtanen Date: Wed, 1 Jun 2011 16:36:12 +0000 (-0700) Subject: Allow embedded '\0' in bufferlists when copying to std::string. X-Git-Tag: v0.29~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9b37f4fa5f1ee7634ac1b489862e7c1b8a27670c;p=ceph.git Allow embedded '\0' in bufferlists when copying to std::string. Signed-off-by: Tommi Virtanen --- diff --git a/src/include/buffer.h b/src/include/buffer.h index 4bef7ea342d8..25ba62f640bb 100644 --- a/src/include/buffer.h +++ b/src/include/buffer.h @@ -418,8 +418,6 @@ public: unsigned howmuch = p->length() - p_off; const char *c_str = p->c_str(); if (len < howmuch) howmuch = len; - if (memchr(c_str + p_off, '\0', howmuch)) - throw malformed_input("embedded NULL in string!"); dest.append(c_str + p_off, howmuch); len -= howmuch;