RTEMS | libmisc/stackchk: Add stack smashing protection (!277)
Mohamed Hassan (@Hamzi)
gitlab at rtems.org
Sat Dec 28 17:58:18 UTC 2024
Mohamed Hassan commented on a discussion on testsuites/libtests/stackchk05/init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/277#note_117341
> +
> +#include "system.h"
> +
> +#include <rtems/bspIo.h>
> +
> +extern const char rtems_test_name[];
> +
> +const char* long_string = "This string is definitely too long for the buffer";
> +
> +void invoke_stack_overflows(void)
> +{
> + char buffer_short[20];
> +
> + strcpy(buffer_short, long_string);
> +
> + printk("Stack Overflow invoked\n");
Noted.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/277#note_117341
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20241228/7d8fec93/attachment.htm>
More information about the bugs
mailing list