]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Allow embedded '\0' in bufferlists when copying to std::string.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Wed, 1 Jun 2011 16:36:12 +0000 (09:36 -0700)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Wed, 1 Jun 2011 16:44:55 +0000 (09:44 -0700)
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
src/include/buffer.h

index 4bef7ea342d848895418151876bd1b298196b6c6..25ba62f640bb58d349243936ae5aa8e898ec375b 100644 (file)
@@ -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;