mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-10-29 05:40:12 -04:00 
			
		
		
		
	render/drm_format_set: fix corruption in wlr_drm_format_set_remove()
A single byte was moved instead of a full uint64_t. This results in corrupted lists containing bogus modifiers.
This commit is contained in:
		
							parent
							
								
									e21899037a
								
							
						
					
					
						commit
						2424b1ecdd
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -95,7 +95,7 @@ bool wlr_drm_format_set_remove(struct wlr_drm_format_set *set, uint32_t format, | |||
| 
 | ||||
| 	for (size_t idx = 0; idx < fmt->len; idx++) { | ||||
| 		if (fmt->modifiers[idx] == modifier) { | ||||
| 			memmove(&fmt->modifiers[idx], &fmt->modifiers[idx+1], fmt->len - idx - 1); | ||||
| 			memmove(&fmt->modifiers[idx], &fmt->modifiers[idx+1], (fmt->len - idx - 1) * sizeof(fmt->modifiers[0])); | ||||
| 			fmt->len--; | ||||
| 			return true; | ||||
| 		} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Simon Ser
						Simon Ser