# HG changeset patch # User jwe # Date 947532463 0 # Node ID 48aa4415131732db7447017cb4c6796f9008d911 # Parent f6c1c9deb22ac5a7b185819a8272505a77a62216 [project @ 2000-01-10 19:27:43 by jwe] diff -r f6c1c9deb22a -r 48aa44151317 liboctave/ChangeLog --- a/liboctave/ChangeLog Mon Jan 10 16:43:05 2000 +0000 +++ b/liboctave/ChangeLog Mon Jan 10 19:27:43 2000 +0000 @@ -1,3 +1,8 @@ +2000-01-10 John W. Eaton + + * pathsearch.cc (dir_path::all_directories): Avoid dereferencing + NULL directory list returned from kpse_element_dirs + 1999-12-08 John W. Eaton * dbleLU.cc (LU::LU): Call DGETRF directly instead of calling DGESV. diff -r f6c1c9deb22a -r 48aa44151317 liboctave/pathsearch.cc --- a/liboctave/pathsearch.cc Mon Jan 10 16:43:05 2000 +0000 +++ b/liboctave/pathsearch.cc Mon Jan 10 19:27:43 2000 +0000 @@ -75,19 +75,23 @@ { str_llist_type *elt_dirs = kpse_element_dirs (pv[i].c_str ()); - str_llist_elt_type *dir; - for (dir = *elt_dirs; dir; dir = STR_LLIST_NEXT (*dir)) + if (elt_dirs) { - char *elt_dir = STR_LLIST (*dir); + str_llist_elt_type *dir; - if (elt_dir) + for (dir = *elt_dirs; dir; dir = STR_LLIST_NEXT (*dir)) { - if (count == nmax) - nmax *= 2; + char *elt_dir = STR_LLIST (*dir); - retval.resize (nmax); + if (elt_dir) + { + if (count == nmax) + nmax *= 2; - retval[count++] = elt_dir; + retval.resize (nmax); + + retval[count++] = elt_dir; + } } } }