[30630] in CVS-changelog-for-Kerberos-V5
krb5 commit [krb5-1.16]: Don't skip past zero byte in profile parsing
daemon@ATHENA.MIT.EDU (Greg Hudson)
Mon Dec 9 18:22:55 2019
Date: Mon, 9 Dec 2019 18:22:11 -0500
From: Greg Hudson <ghudson@mit.edu>
Message-ID: <201912092322.xB9NMBvA019302@drugstore.mit.edu>
To: <cvs-krb5@mit.edu>
MIME-Version: 1.0
Reply-To: krbdev@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/4921687ed77160bd1c43d7f5bba79c8b00529e93
commit 4921687ed77160bd1c43d7f5bba79c8b00529e93
Author: Greg Hudson <ghudson@mit.edu>
Date: Wed Aug 14 11:46:14 2019 -0400
Don't skip past zero byte in profile parsing
In parse_quoted_string(), only process an escape sequence if there is
a second character after the backlash, to avoid reading past the
terminating zero byte. Reported by Lutz Justen.
(cherry picked from commit a449bfc16c32019fec8b4deea963a3e474b0d14d)
ticket: 8825
version_fixed: 1.16.4
src/util/profile/prof_parse.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/util/profile/prof_parse.c b/src/util/profile/prof_parse.c
index 1baceea..2b0aa9a 100644
--- a/src/util/profile/prof_parse.c
+++ b/src/util/profile/prof_parse.c
@@ -48,7 +48,7 @@ static void parse_quoted_string(char *str)
char *to, *from;
for (to = from = str; *from && *from != '"'; to++, from++) {
- if (*from == '\\') {
+ if (*from == '\\' && *(from + 1) != '\0') {
from++;
switch (*from) {
case 'n':
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5