setup: move stack protector variable to setup.h

pull/25/head
Pavol Rusnak 7 years ago
parent c8ddd90409
commit 91c4cbdbd0
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

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

@ -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

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

@ -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);

Loading…
Cancel
Save