Monday, June 18, 2018

[389-commits] [389-ds-base] 01/01: Fixing 4-byte UTF-8 character validation

This is an automated email from the git hooks/post-receive script.

mreynolds pushed a commit to branch 389-ds-base-1.3.8
in repository 389-ds-base.

commit 62b86b057409ee24ce01c547b85e2499606ca6b9
Author: Dj Padzensky <djpadz@padz.net>
Date: Wed Jun 13 18:46:55 2018 -0700

Fixing 4-byte UTF-8 character validation

(cherry picked from commit 2707e39868c16275aa070102f2fda6047632354a)
---
ldap/servers/plugins/syntaxes/validate.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/ldap/servers/plugins/syntaxes/validate.c b/ldap/servers/plugins/syntaxes/validate.c
index 371ab32..bea0ba4 100644
--- a/ldap/servers/plugins/syntaxes/validate.c
+++ b/ldap/servers/plugins/syntaxes/validate.c
@@ -241,12 +241,14 @@ utf8char_validate(
* the second byte. */
if (*p == '\xF0') {
/* The next byte must be %x90-BF. */
+ p++;
if (((unsigned char)*p < (unsigned char)'\x90') || ((unsigned char)*p > (unsigned char)'\xBF')) {
rc = 1;
goto exit;
}
} else if (*p == '\xF4') {
/* The next byte must be %x80-BF. */
+ p++;
if (((unsigned char)*p < (unsigned char)'\x80') || ((unsigned char)*p > (unsigned char)'\xBF')) {
rc = 1;
goto exit;

--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
389-commits mailing list -- 389-commits@lists.fedoraproject.org
To unsubscribe send an email to 389-commits-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/389-commits@lists.fedoraproject.org/message/LIUSYZWGJUIEBHL6SUGIR2FVKLJELSZH/

No comments:

Post a Comment