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
The following commit(s) were added to refs/heads/main by this push:
new 139ed8bc2 PROTON-2746: Fix potential uninitialized/illegal read
139ed8bc2 is described below
commit 139ed8bc216fded1426e0bcfd11b48a277de09e0
Author: Andrew Stitcher <[email protected]>
AuthorDate: Wed Jun 28 11:29:32 2023 -0400
PROTON-2746: Fix potential uninitialized/illegal read
Found by valgrind running a test on new code.
---
c/src/core/value_dump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/c/src/core/value_dump.c b/c/src/core/value_dump.c
index 3dbcea9ea..9a5af81e3 100644
--- a/c/src/core/value_dump.c
+++ b/c/src/core/value_dump.c
@@ -284,7 +284,7 @@ void pn_value_dump_scalar(uint8_t type, pn_bytes_t value,
pn_fixed_string_t *out
break;
case 3: {
bool quote = false;
- if (!isalpha(value.start[0])) {
+ if (value.size==0 || !isalpha(value.start[0])) {
quote = true;
} else {
for (size_t i = 1; i < value.size; i++) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]