decoder/flac: fixed NULL pointer dereference in CUE code
The function flac_vtrack_tnum() was missing a strrchr()==NULL check.
This commit is contained in:
		
							
								
								
									
										1
									
								
								NEWS
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								NEWS
									
									
									
									
									
								
							| @@ -11,6 +11,7 @@ ver 0.15.6 (2009/??/??) | |||||||
|   - ffmpeg: align the output buffer |   - ffmpeg: align the output buffer | ||||||
|   - oggflac: rewind stream after FLAC detection |   - oggflac: rewind stream after FLAC detection | ||||||
|   - flac: fixed CUE seeking range check |   - flac: fixed CUE seeking range check | ||||||
|  |   - flac: fixed NULL pointer dereference in CUE code | ||||||
| * output_thread: check again if output is open on PAUSE | * output_thread: check again if output is open on PAUSE | ||||||
| * update: delete ignored symlinks from database | * update: delete ignored symlinks from database | ||||||
| * database: increased maximum line length to 32 kB | * database: increased maximum line length to 32 kB | ||||||
|   | |||||||
| @@ -415,6 +415,8 @@ flac_vtrack_tnum(const char* fname) | |||||||
| 	 * another/better way would be to use tag struct | 	 * another/better way would be to use tag struct | ||||||
| 	 */ | 	 */ | ||||||
| 	char* ptr = strrchr(fname, '_'); | 	char* ptr = strrchr(fname, '_'); | ||||||
|  | 	if (ptr == NULL) | ||||||
|  | 		return 0; | ||||||
|  |  | ||||||
| 	// copy ascii tracknumber to int | 	// copy ascii tracknumber to int | ||||||
| 	char vtrack[4]; | 	char vtrack[4]; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann