[PATCH] [ARM] fix buffer overflow in gas

Nick Clifton nickc@redhat.com
Tue Oct 27 09:36:00 GMT 2015


Hi Jim,

> The problem is that the string "Samsung Exynos M1" is 18 characters
> long including the trailing null byte, but the select_cpu_name array
> is only 16 characters long.

Thanks for the bug report and patch.  I have checked your patch in, 
along with the addition of an assert in arm_parse_cpu, which should 
catch problems like this in the future.

Cheers
   Nick

gas/ChangeLog
2015-10-27  Jim Wilson  <jim.wilson@linaro.org>

	* config/tc-arm.c (selected_cpu_name): Increase length of array to
	accomodate "Samsung Exynos M1".
	(arm_parse_cpu): Add assertion and length check to prevent
	overfilling selected_cpu_name.



More information about the Binutils mailing list