Browse Source

search_for_named_library forgot to wipe the target string, so each time
around the loop it was getting bigger...

Eric Andersen 23 years ago
parent
commit
ea9de29581
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ldso/util/ldd.c

+ 1 - 1
ldso/util/ldd.c

@@ -123,8 +123,8 @@ static void search_for_named_library(char *name, char *result, const char *path_
 	}
 
 	path_n = path;
-	*result = '\0';
 	for (i = 0; i < count; i++) {
+		*result = '\0';
 		strcat(result, path_n); 
 		strcat(result, "/"); 
 		strcat(result, name);