1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-12 18:49:07 +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());
}
extern uint32_t __stack_chk_guard;
int main(void)
{
#ifndef APPVER

View File

@ -238,14 +238,6 @@ void usbInit(void)
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)
{
#ifndef APPVER

View File

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

View File

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