projects
/
haproxy-2.1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7eab37b
)
BUG/MINOR: sample: Set the correct type when a binary is converted to a string
author
Christopher Faulet
<cfaulet@haproxy.com>
Thu, 30 Apr 2020 07:57:40 +0000
(09:57 +0200)
committer
Christopher Faulet
<cfaulet@haproxy.com>
Wed, 20 May 2020 16:44:44 +0000
(18:44 +0200)
A binary sample data can be converted, implicitly or not, to a string by cutting
the buffer on the first null byte.
I guess this patch should be backported to all stable versions.
(cherry picked from commit
472ad51edeb4bb5ea601d7e296b5d0a0cd1a140a
)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/sample.c
patch
|
blob
|
history
diff --git
a/src/sample.c
b/src/sample.c
index
7362a2d
..
6cda2e1
100644
(file)
--- a/
src/sample.c
+++ b/
src/sample.c
@@
-621,6
+621,7
@@
static int c_bin2str(struct sample *smp)
break;
}
}
+ smp->data.type = SMP_T_STR;
return 1;
}