mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Avoiding a zero sized array in cDevice::GetDevice()
This commit is contained in:
		| @@ -2209,6 +2209,7 @@ Marko M | ||||
|  for avoiding the memcpy() call in cGlyph::cGlyph() if the bitmap is empty | ||||
|  for avoiding unnecessary processing in cDvbSubtitleConverter::FinishPage() if there | ||||
|  are no areas | ||||
|  for avoiding a zero sized array in cDevice::GetDevice() | ||||
|  | ||||
| Patrick Rother <krd-vdr@gulu.net> | ||||
|  for reporting a bug in defining timers that only differ in the day of week | ||||
|   | ||||
							
								
								
									
										3
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								HISTORY
									
									
									
									
									
								
							| @@ -9816,7 +9816,7 @@ Video Disk Recorder Revision History | ||||
| - Added missing rounding when dividing frequencies in processing the NIT (thanks to | ||||
|   Winfried K<>hler). | ||||
|  | ||||
| 2022-12-06: | ||||
| 2022-12-07: | ||||
|  | ||||
| - Fixed a compiler warning. | ||||
| - Fixed generating the index file in the cutter (reported by Christoph Haubrich). | ||||
| @@ -9830,3 +9830,4 @@ Video Disk Recorder Revision History | ||||
|   to Marko M<>kel<65>). | ||||
| - Now avoiding unnecessary processing in cDvbSubtitleConverter::FinishPage() if there | ||||
|   are no areas (thanks to Marko M<>kel<65>). | ||||
| - Avoiding a zero sized array in cDevice::GetDevice() (thanks to Marko M<>kel<65>). | ||||
|   | ||||
							
								
								
									
										4
									
								
								device.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								device.c
									
									
									
									
									
								
							| @@ -4,7 +4,7 @@ | ||||
|  * See the main source file 'vdr.c' for copyright information and | ||||
|  * how to reach the author. | ||||
|  * | ||||
|  * $Id: device.c 5.5 2022/01/24 16:53:45 kls Exp $ | ||||
|  * $Id: device.c 5.6 2022/12/07 09:38:05 kls Exp $ | ||||
|  */ | ||||
|  | ||||
| #include "device.h" | ||||
| @@ -249,7 +249,7 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView | ||||
| { | ||||
|   // Collect the current priorities of all CAM slots that can decrypt the channel: | ||||
|   int NumCamSlots = CamSlots.Count(); | ||||
|   int SlotPriority[NumCamSlots]; | ||||
|   int SlotPriority[NumCamSlots + 1]; // +1 to avoid a zero sized array in case there are no CAM slots | ||||
|   int NumUsableSlots = 0; | ||||
|   bool InternalCamNeeded = false; | ||||
|   if (Channel->Ca() >= CA_ENCRYPTED_MIN) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user