Phoenix-RTOS: Add checking EOF in getmntent().
This commit is contained in:
		
				
					committed by
					
						 Corinna Vinschen
						Corinna Vinschen
					
				
			
			
				
	
			
			
			
						parent
						
							cd169e629a
						
					
				
				
					commit
					0601c03109
				
			| @@ -47,7 +47,7 @@ struct mntent *getmntent_r(FILE *fp, struct mntent *result, char *buffer, int bu | ||||
|  | ||||
| 	buff_ptr = buffer; | ||||
|  | ||||
| 	if (getline(&line, &size, fp) == -1) { | ||||
| 	if (getline(&line, &size, fp) == -1 || feof(fp)) { | ||||
| 		free(line); | ||||
| 		return NULL; | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user