mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-13 19:29:53 +03:00
36 lines
1.6 KiB
Diff
36 lines
1.6 KiB
Diff
# Replace data type long with int to maintain structure sizes in 32/64 bits
|
|
--- a/ciso.h 2006-11-03 15:53:02.000000000 -0500
|
|
+++ b/ciso.h 2023-08-26 10:01:59.066162109 -0400
|
|
@@ -28,10 +28,10 @@
|
|
typedef struct ciso_header
|
|
{
|
|
unsigned char magic[4]; /* +00 : 'C','I','S','O' */
|
|
- unsigned long header_size; /* +04 : header size (==0x18) */
|
|
+ unsigned int header_size; /* +04 : header size (==0x18) */
|
|
unsigned long long total_bytes; /* +08 : number of original data size */
|
|
- unsigned long block_size; /* +10 : number of compressed block size */
|
|
+ unsigned int block_size; /* +10 : number of compressed block size */
|
|
unsigned char ver; /* +14 : version 01 */
|
|
unsigned char align; /* +15 : align of index value */
|
|
unsigned char rsv_06[2]; /* +16 : reserved */
|
|
|
|
--- a/ciso.c 2006-11-03 15:53:29.000000000 -0500
|
|
+++ b/ciso.c 2023-08-26 09:59:57.817871093 -0400
|
|
@@ -117,7 +118,7 @@
|
|
ciso_total_block = ciso.total_bytes / ciso.block_size;
|
|
|
|
/* allocate index block */
|
|
- index_size = (ciso_total_block + 1 ) * sizeof(unsigned long);
|
|
+ index_size = (ciso_total_block + 1 ) * sizeof(unsigned int);
|
|
index_buf = malloc(index_size);
|
|
block_buf1 = malloc(ciso.block_size);
|
|
block_buf2 = malloc(ciso.block_size*2);
|
|
@@ -257,7 +258,7 @@
|
|
}
|
|
|
|
/* allocate index block */
|
|
- index_size = (ciso_total_block + 1 ) * sizeof(unsigned long);
|
|
+ index_size = (ciso_total_block + 1 ) * sizeof(unsigned int);
|
|
index_buf = malloc(index_size);
|
|
crc_buf = malloc(index_size);
|
|
block_buf1 = malloc(ciso.block_size);
|