mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 18:55:19 +00:00 
			
		
		
		
	Move an feof() call to before the fgets().
This would have exited the loop early if you had an authentication file with no newline at the end. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -150,11 +150,11 @@ static int auth_exec(struct ast_channel *chan, void *data) | ||||
| 			for (;;) { | ||||
| 				size_t len; | ||||
|  | ||||
| 				fgets(buf, sizeof(buf), f); | ||||
|  | ||||
| 				if (feof(f)) | ||||
| 					break; | ||||
|  | ||||
| 				fgets(buf, sizeof(buf), f); | ||||
|  | ||||
| 				if (ast_strlen_zero(buf)) | ||||
| 					continue; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user