mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	Fix segfault with dmix of 3-bytes formats
The i386 and x86-64 dmix may cause segfaults when 3-bytes formats are used due to btsl asm code, which may overcome the buffer end-boundary. The patch changes btsl to btsw so that it doesn't happen. ALSA bug#3341: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3341 Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
		
							parent
							
								
									1467f4e238
								
							
						
					
					
						commit
						2076b88a77
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -400,7 +400,7 @@ static void MIX_AREAS_24(unsigned int size,
 | 
			
		|||
		"\tmovzwl (%%esi), %%ecx\n"
 | 
			
		||||
		"\tmovl (%%ebx), %%edx\n"
 | 
			
		||||
		"\tsall $16, %%eax\n"
 | 
			
		||||
		"\t" LOCK_PREFIX "btsl $0, (%%edi)\n"
 | 
			
		||||
		"\t" LOCK_PREFIX "btsw $0, (%%edi)\n"
 | 
			
		||||
		"\tleal (%%ecx,%%eax,1), %%ecx\n"
 | 
			
		||||
		"\tjc 2f\n"
 | 
			
		||||
		"\t" XSUB " %%edx, %%ecx\n"
 | 
			
		||||
| 
						 | 
				
			
			@ -505,7 +505,7 @@ static void MIX_AREAS_24_CMOV(unsigned int size,
 | 
			
		|||
		"\tmovzwl (%%esi), %%ecx\n"
 | 
			
		||||
		"\tmovl (%%ebx), %%edx\n"
 | 
			
		||||
		"\tsall $16, %%eax\n"
 | 
			
		||||
		"\t" LOCK_PREFIX "btsl $0, (%%edi)\n"
 | 
			
		||||
		"\t" LOCK_PREFIX "btsw $0, (%%edi)\n"
 | 
			
		||||
		"\tleal (%%ecx,%%eax,1), %%ecx\n"
 | 
			
		||||
		"\tjc 2f\n"
 | 
			
		||||
		"\t" XSUB " %%edx, %%ecx\n"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -287,7 +287,7 @@ static void MIX_AREAS_24(unsigned int size,
 | 
			
		|||
		"\tmovswl (%%rsi), %%ecx\n"
 | 
			
		||||
		"\tmovl (%%rbx), %%edx\n"
 | 
			
		||||
		"\tsall $16, %%eax\n"
 | 
			
		||||
		"\t" LOCK_PREFIX "btsl $0, (%%rdi)\n"
 | 
			
		||||
		"\t" LOCK_PREFIX "btsw $0, (%%rdi)\n"
 | 
			
		||||
		"\t.byte 0x67, 0x8d, 0x0c, 0x01\n"
 | 
			
		||||
		"\tjc 2f\n"
 | 
			
		||||
		"\t" XSUB " %%edx, %%ecx\n"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue