1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 03:30:02 +00:00

setup: move stack protector variable to setup.h

This commit is contained in:
Pavol Rusnak 2017-07-30 21:50:36 +02:00
parent c8ddd90409
commit 91c4cbdbd0
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
4 changed files with 4 additions and 12 deletions

View File

@ -120,8 +120,6 @@ void bootloader_loop(void)
usbLoop(firmware_present()); usbLoop(firmware_present());
} }
extern uint32_t __stack_chk_guard;
int main(void) int main(void)
{ {
#ifndef APPVER #ifndef APPVER

View File

@ -238,14 +238,6 @@ void usbInit(void)
usbd_register_set_config_callback(usbd_dev, hid_set_config); usbd_register_set_config_callback(usbd_dev, hid_set_config);
} }
uint32_t __stack_chk_guard;
void __attribute__((noreturn)) __stack_chk_fail(void)
{
layoutDialog(&bmp_icon_error, NULL, NULL, NULL, "Stack smashing", "detected.", NULL, "Please unplug", "the device.", NULL);
for (;;) {} // loop forever
}
int main(void) int main(void)
{ {
#ifndef APPVER #ifndef APPVER

View File

@ -31,8 +31,6 @@
#include "buttons.h" #include "buttons.h"
#include "fastflash.h" #include "fastflash.h"
extern uint32_t __stack_chk_guard;
void check_lock_screen(void) void check_lock_screen(void)
{ {
buttonUpdate(); buttonUpdate();

View File

@ -20,6 +20,10 @@
#ifndef __SETUP_H__ #ifndef __SETUP_H__
#define __SETUP_H__ #define __SETUP_H__
#include <stdint.h>
extern uint32_t __stack_chk_guard;
void setup(void); void setup(void);
void setupApp(void); void setupApp(void);