Commit a690469e authored by Philip Carns's avatar Philip Carns
Browse files

fix mnt table overflow, reported by David Shrader


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@784 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 8e53fb71
...@@ -2104,7 +2104,7 @@ static void darshan_get_exe_and_mounts_root(struct darshan_job_runtime* final_jo ...@@ -2104,7 +2104,7 @@ static void darshan_get_exe_and_mounts_root(struct darshan_job_runtime* final_jo
return; return;
/* loop through list of mounted file systems */ /* loop through list of mounted file systems */
while((entry = getmntent(tab)) != NULL) while(mnt_data_count<CP_MAX_MNTS && (entry = getmntent(tab)) != NULL)
{ {
/* filter out excluded fs types */ /* filter out excluded fs types */
tmp_index = 0; tmp_index = 0;
...@@ -2157,6 +2157,8 @@ static void darshan_get_exe_and_mounts_root(struct darshan_job_runtime* final_jo ...@@ -2157,6 +2157,8 @@ static void darshan_get_exe_and_mounts_root(struct darshan_job_runtime* final_jo
mnt_data_count++; mnt_data_count++;
} }
endmntent(tab);
/* Sort mount points in order of longest path to shortest path. This is /* Sort mount points in order of longest path to shortest path. This is
* necessary so that if we try to match file paths to mount points later * necessary so that if we try to match file paths to mount points later
* we don't match on "/" every time. * we don't match on "/" every time.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment