]> git.sesse.net Git - plocate/commitdiff
Fix an infinite loop when encountering invalid UTF-8 in file names.
authorSteinar H. Gunderson <steinar+git@gunderson.no>
Sat, 31 Oct 2020 21:27:41 +0000 (22:27 +0100)
committerSteinar H. Gunderson <steinar+git@gunderson.no>
Sat, 31 Oct 2020 21:27:41 +0000 (22:27 +0100)
Bug report and patch by Leah Neukirchen.

serializer.cpp

index 7d4ce119fceff9683584dbc8898682e1e9c9662e..d2f126c0aaa89fe3ee42833fa1b35894553ac75f 100644 (file)
@@ -84,6 +84,7 @@ void print_possibly_escaped(const string &str)
                        printf("?");
                        ++ptr;
                        --len;
+                       continue;
                } else if (ret == 0) {
                        break;  // EOF.
                }