فهرست منبع

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

Eric Andersen 24 سال پیش
والد
کامیت
ea9de29581
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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);