Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

fix(kuna): keep the real lane's wide-string marker independent of layout (#4116)

Kaoru0822cfd3c35a50ec
diff --git a/scripts/verify-real-kuna.mjs b/scripts/verify-real-kuna.mjs
index 2361c98ac..289073c9a 100644
--- a/scripts/verify-real-kuna.mjs
+++ b/scripts/verify-real-kuna.mjs
@@ -83,8 +83,11 @@ const FIXTURE_SOURCE = String.raw`
#include <stdio.h>
#include <stdlib.h>
static const char rea_kuna_utf8[] __attribute__((used)) = "_φ( °-°)/ REA unicode marker";
+/* The leading NUL unit ends any UTF-16 run that bytes before this array would
+ start: the UTF-8 marker's last byte and NUL decode as the unit 'r', so on
+ layouts where it precedes this array Kuna reports "rREA wide marker". */
static const unsigned short rea_kuna_wide[] __attribute__((used)) = {
- 'R','E','A',' ','w','i','d','e',' ','m','a','r','k','e','r',0
+ 0,'R','E','A',' ','w','i','d','e',' ','m','a','r','k','e','r',0
};
#include <string.h>
__attribute__((noinline)) unsigned rea_checksum(const unsigned char *p, size_t n) {