Fix buffer overflows in df(1), format(1)
This commit is contained in:
		
							parent
							
								
									179261a9b6
								
							
						
					
					
						commit
						130b082121
					
				| @ -109,7 +109,8 @@ static void readmtab(const char *type) | |||||||
| { | { | ||||||
|   struct mtab **amt= &mtab, *new; |   struct mtab **amt= &mtab, *new; | ||||||
|   struct stat st; |   struct stat st; | ||||||
|   char devname[128], mountpoint[128], version[10], rw_flag[10]; |   char devname[PATH_MAX], mountpoint[PATH_MAX], version[MNTNAMELEN], | ||||||
|  | 	rw_flag[MNTFLAGLEN]; | ||||||
| 
 | 
 | ||||||
|   if (load_mtab("df") < 0) exit(1); |   if (load_mtab("df") < 0) exit(1); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -290,7 +290,7 @@ int main(int argc, char **argv) | |||||||
| 	int verify= 0; | 	int verify= 0; | ||||||
| 	struct stat st0, st; | 	struct stat st0, st; | ||||||
| 	char special[PATH_MAX + 1], mounted_on[PATH_MAX + 1]; | 	char special[PATH_MAX + 1], mounted_on[PATH_MAX + 1]; | ||||||
| 	char version[10], rw_flag[10]; | 	char version[MNTNAMELEN], rw_flag[MNTFLAGLEN]; | ||||||
| 
 | 
 | ||||||
| 	/* Option -v. */ | 	/* Option -v. */ | ||||||
| 	while (argc > 1 && argv[1][0] == '-') { | 	while (argc > 1 && argv[1][0] == '-') { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 David van Moolenbroek
						David van Moolenbroek