You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2023/01/04 23:03:15 UTC
[qpid-proton] 01/03: PROTON-2664: Frame dumps truncated if there is a zero length string
This is an automated email from the ASF dual-hosted git repository.
astitcher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
commit b4bb7a26d221ed235178f83905c73c65f24080e1
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Wed Jan 4 17:33:48 2023 -0500
PROTON-2664: Frame dumps truncated if there is a zero length string
We were treating 0 length strings as if there was an overflow and
leaving the string terminated in the middle.
---
c/src/core/fixed_string.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/c/src/core/fixed_string.h b/c/src/core/fixed_string.h
index 6df7be761..e60c3102a 100644
--- a/c/src/core/fixed_string.h
+++ b/c/src/core/fixed_string.h
@@ -82,7 +82,7 @@ static inline void pn_fixed_string_quote(pn_fixed_string_t *str, const char *dat
char *out = &str->bytes[str->position];
ssize_t out_size = pn_quote_data(out, bytes_left, data, size);
// The only error (ie value less than 0) that can come from pn_quote_data is PN_OVERFLOW
- if ( out_size>0 ) {
+ if ( out_size>=0 ) {
str->position += out_size;
} else {
str->position = str->size;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org