You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2012/07/03 16:01:59 UTC
svn commit: r1356738 - /qpid/proton/trunk/proton-c/src/util.c
Author: rhs
Date: Tue Jul 3 14:01:58 2012
New Revision: 1356738
URL: http://svn.apache.org/viewvc?rev=1356738&view=rev
Log:
fixed overwrite bug in pn_quote_data
Modified:
qpid/proton/trunk/proton-c/src/util.c
Modified: qpid/proton/trunk/proton-c/src/util.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/util.c?rev=1356738&r1=1356737&r2=1356738&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/util.c (original)
+++ qpid/proton/trunk/proton-c/src/util.c Tue Jul 3 14:01:58 2012
@@ -37,13 +37,13 @@ ssize_t pn_quote_data(char *dst, size_t
{
uint8_t c = src[i];
if (isprint(c)) {
- if (idx < capacity - 1) {
+ if (idx < (int) (capacity - 1)) {
dst[idx++] = c;
} else {
return PN_OVERFLOW;
}
} else {
- if (idx < capacity - 4) {
+ if (idx < (int) (capacity - 4)) {
idx += sprintf(dst + idx, "\\x%.2x", c);
} else {
return PN_OVERFLOW;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org