From 61977cb4690915dda6a9e4dd6a9f22f065d74e8f Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Fri, 19 Dec 2025 08:41:29 +0300
Subject: [PATCH 1/2] Unaligned access in bootstrap.c ?

---
 cinelerra-5.1/guicast/bootstrap.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/cinelerra-5.1/guicast/bootstrap.c b/cinelerra-5.1/guicast/bootstrap.c
index 0ba35514..6a8b4894 100644
--- a/cinelerra-5.1/guicast/bootstrap.c
+++ b/cinelerra-5.1/guicast/bootstrap.c
@@ -53,8 +53,17 @@ void append_contents(char *path,
 	strcpy(buffer + *buffer_size, string);
 
 	*buffer_size += strlen(string) + 1;
-
-	*(int*)(buffer + *buffer_size) = data_offset;
+	
+	
+	int tmp = 0;
+	char *ptr = buffer+*buffer_size;
+	memcpy(&tmp, &ptr, sizeof(int));
+	tmp = data_offset;
+	ptr[3] = tmp >> 24;
+	ptr[2] = tmp >> 16;
+	ptr[1] = tmp >> 8;
+	ptr[0] = tmp;
+	//*(int*)(buffer + *buffer_size) = data_offset;
 	*buffer_size += sizeof(int);
 }
 
-- 
2.52.0

