diff liboctave/util/kpse.cc @ 26084:8eae32b6bce0 stable

Don't segfault for unmatched brace in PATH (bug #55013). * kpse.cc (brace_gobbler): Check whether routine has found a brace, or just the end-of-string. For the latter, return 0 because search failed.
author Rik <rik@octave.org>
date Thu, 15 Nov 2018 16:42:22 -0800
parents 6652d3823428
children 94fc8648f0fe
line wrap: on
line diff
--- a/liboctave/util/kpse.cc	Wed Nov 14 10:53:30 2018 -0800
+++ b/liboctave/util/kpse.cc	Thu Nov 15 16:42:22 2018 -0800
@@ -1120,6 +1120,7 @@
     }
 
   indx = i;
+  c = (c == satisfy) ? c : 0;
   return c;
 }