mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 08:22:16 +01:00 
			
		
		
		
	Fix the upper bound in g_unichar_iswide_bsearch
asan noticed an array out of bound access in this function, which was because we were accessing G_N_ELEMENTS + 1. https://bugzilla.gnome.org/show_bug.cgi?id=766211
This commit is contained in:
		
				
					committed by
					
						 Matthias Clasen
						Matthias Clasen
					
				
			
			
				
	
			
			
			
						parent
						
							9a865020ca
						
					
				
				
					commit
					bcbd8d73ce
				
			| @@ -439,7 +439,7 @@ static inline gboolean | ||||
| g_unichar_iswide_bsearch (gunichar ch) | ||||
| { | ||||
|   int lower = 0; | ||||
|   int upper = G_N_ELEMENTS (g_unicode_width_table_wide) + 1; | ||||
|   int upper = G_N_ELEMENTS (g_unicode_width_table_wide) - 1; | ||||
|   static int saved_mid = G_WIDTH_TABLE_MIDPOINT; | ||||
|   int mid = saved_mid; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user