Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pointer arithmetic on canary placement #147

Merged
merged 3 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/zxversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
#pragma once

#define ZXLIB_MAJOR 29
#define ZXLIB_MINOR 1
#define ZXLIB_MINOR 2
#define ZXLIB_PATCH 0
2 changes: 1 addition & 1 deletion src/zxcanary.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

// This symbol is defined by the link script to be at the start of the stack area.
extern unsigned int app_stack_canary;
#define ZONDAX_CANARY (*((volatile uint32_t*) (&app_stack_canary + sizeof(uint32_t))))
#define ZONDAX_CANARY (*((volatile uint32_t*) (((uint8_t*) &app_stack_canary) + sizeof(uint32_t))))

#if defined(HAVE_ZONDAX_CANARY)
#include "errors.h"
Expand Down