]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Don't skip past zero byte in profile parsing 968/head
authorGreg Hudson <ghudson@mit.edu>
Wed, 14 Aug 2019 15:46:14 +0000 (11:46 -0400)
committerGreg Hudson <ghudson@mit.edu>
Thu, 15 Aug 2019 17:38:34 +0000 (13:38 -0400)
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.

ticket: 8825 (new)
tags: pullup
target_version: 1.17-next
target_version: 1.16-next

src/util/profile/prof_parse.c

index 531e4a099065e4228cb05612fc08bf096e788218..7ba44aca6eeeb71f445c261800ba178921750800 100644 (file)
@@ -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':