[Asterisk-code-review] func curl: Don't trim response text on non-ASCII characters (asterisk[master])
Ivan Poddubny
asteriskteam at digium.com
Sat May 21 08:54:36 CDT 2016
Ivan Poddubny has uploaded a new change for review.
https://gerrit.asterisk.org/2891
Change subject: func_curl: Don't trim response text on non-ASCII characters
......................................................................
func_curl: Don't trim response text on non-ASCII characters
The characters 0x80-0xFF were trimmed as well as 0x00-0x20 because of
a signed comparison.
ASTERISK-25669 #close
Reported by: Jesper
patches:
strings.curl.trim.patch submitted by Jesper (License 5518)
Change-Id: Ia51e169f24e3252a7ebbaab3728630138ec6f60a
---
M include/asterisk/strings.h
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/91/2891/1
diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h
index 0e2f69b..2ca75a6 100644
--- a/include/asterisk/strings.h
+++ b/include/asterisk/strings.h
@@ -688,7 +688,7 @@
if (!buf) {
return;
}
- while (buf->__AST_STR_USED && buf->__AST_STR_STR[buf->__AST_STR_USED - 1] < 33) {
+ while (buf->__AST_STR_USED && ((unsigned char) buf->__AST_STR_STR[buf->__AST_STR_USED - 1]) < 33) {
buf->__AST_STR_STR[--(buf->__AST_STR_USED)] = '\0';
}
}
--
To view, visit https://gerrit.asterisk.org/2891
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia51e169f24e3252a7ebbaab3728630138ec6f60a
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Ivan Poddubny <ivan.poddubny at gmail.com>
More information about the asterisk-code-review
mailing list