Skip to content

Commit

Permalink
Fix pointer arithmetic on canary placement (#147)
Browse files Browse the repository at this point in the history
* Fix pointer arithmetic on canary placement

* bump version
  • Loading branch information
0xPxt authored Oct 11, 2024
1 parent c4c3548 commit 337d761
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit 337d761

Please sign in to comment.