qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r1419512 - /qpid/proton/trunk/proton-c/src/codec/codec.c
Date Mon, 10 Dec 2012 15:20:27 GMT
Author: rhs
Date: Mon Dec 10 15:20:26 2012
New Revision: 1419512

URL: http://svn.apache.org/viewvc?rev=1419512&view=rev
Log:
null terminate decoded strings

Modified:
    qpid/proton/trunk/proton-c/src/codec/codec.c

Modified: qpid/proton/trunk/proton-c/src/codec/codec.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/codec/codec.c?rev=1419512&r1=1419511&r2=1419512&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/codec/codec.c (original)
+++ qpid/proton/trunk/proton-c/src/codec/codec.c Mon Dec 10 15:20:26 2012
@@ -1058,7 +1058,9 @@ ssize_t pn_data_intern(pn_data_t *data, 
   size_t offset = pn_buffer_size(data->buf);
   int err = pn_buffer_append(data->buf, start, size);
   if (err) return err;
-  else return offset;
+  err = pn_buffer_append(data->buf, "\0", 1);
+  if (err) return err;
+  return offset;
 }
 
 pn_bytes_t *pn_data_bytes(pn_data_t *data, pn_node_t *node)



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message