@@ -66,17 +66,17 @@ _validate_index_file (const char *filename,
6666 goto validation_fail ;
6767 }
6868
69- copy_field (& ver , VERSION_OFFSET , KEPT_ENTRY_OFFSET );
69+ copy_field (ver , buf , VERSION_OFFSET , KEPT_ENTRY_OFFSET );
7070 ver = GUINT32_FROM_LE (ver );
7171
7272 // total_entry only meaningful for 95 and NT4, on other versions
7373 // it's junk memory data, don't bother copying
7474 if ( ( ver == VERSION_NT4 ) || ( ver == VERSION_WIN95 ) ) {
75- copy_field (& meta -> total_entry , TOTAL_ENTRY_OFFSET , RECORD_SIZE_OFFSET );
75+ copy_field (meta -> total_entry , buf , TOTAL_ENTRY_OFFSET , RECORD_SIZE_OFFSET );
7676 meta -> total_entry = GUINT32_FROM_LE (meta -> total_entry );
7777 }
7878
79- copy_field (& meta -> recordsize , RECORD_SIZE_OFFSET , FILESIZE_SUM_OFFSET );
79+ copy_field (meta -> recordsize , buf , RECORD_SIZE_OFFSET , FILESIZE_SUM_OFFSET );
8080 meta -> recordsize = GUINT32_FROM_LE (meta -> recordsize );
8181
8282 g_free (buf );
@@ -150,15 +150,16 @@ _populate_record_data (void *buf,
150150
151151 // Verbatim path in ANSI code page
152152 record -> raw_legacy_path = g_malloc0 (RECORD_INDEX_OFFSET - LEGACY_FILENAME_OFFSET );
153- copy_field (record -> raw_legacy_path , LEGACY_FILENAME_OFFSET , RECORD_INDEX_OFFSET );
153+ copy_field (* (record -> raw_legacy_path ), buf ,
154+ LEGACY_FILENAME_OFFSET , RECORD_INDEX_OFFSET );
154155
155156 /* Index number associated with the record */
156- copy_field (& record -> index_n , RECORD_INDEX_OFFSET , DRIVE_LETTER_OFFSET );
157+ copy_field (record -> index_n , buf , RECORD_INDEX_OFFSET , DRIVE_LETTER_OFFSET );
157158 record -> index_n = GUINT32_FROM_LE (record -> index_n );
158159 g_debug ("index=%u" , record -> index_n );
159160
160161 /* Number representing drive letter, 'A:' = 0, etc */
161- copy_field (& drivenum , DRIVE_LETTER_OFFSET , FILETIME_OFFSET );
162+ copy_field (drivenum , buf , DRIVE_LETTER_OFFSET , FILETIME_OFFSET );
162163 drivenum = GUINT32_FROM_LE (drivenum );
163164 g_debug ("drive=%u" , drivenum );
164165 if (drivenum >= sizeof (driveletters ) - 1 ) {
@@ -179,13 +180,14 @@ _populate_record_data (void *buf,
179180 }
180181
181182 /* File deletion time */
182- copy_field (& record -> winfiletime , FILETIME_OFFSET , FILESIZE_OFFSET );
183+ copy_field (record -> winfiletime , buf , FILETIME_OFFSET , FILESIZE_OFFSET );
183184 record -> winfiletime = GINT64_FROM_LE (record -> winfiletime );
184185 record -> deltime = win_filetime_to_gdatetime (record -> winfiletime );
185186
186187 /* File size or occupied cluster size */
187188 /* BEWARE! This is 32bit data casted to 64bit struct member */
188- copy_field (& record -> filesize , FILESIZE_OFFSET , UNICODE_FILENAME_OFFSET );
189+ copy_field (record -> filesize , buf ,
190+ FILESIZE_OFFSET , UNICODE_FILENAME_OFFSET );
189191 record -> filesize = GUINT64_FROM_LE (record -> filesize );
190192 g_debug ("filesize=%" PRIu64 , record -> filesize );
191193
@@ -210,7 +212,8 @@ _populate_record_data (void *buf,
210212
211213 uni_buf_sz = UNICODE_RECORD_SIZE - UNICODE_FILENAME_OFFSET ;
212214 record -> raw_uni_path = g_malloc (uni_buf_sz );
213- copy_field (record -> raw_uni_path , UNICODE_FILENAME_OFFSET , UNICODE_RECORD_SIZE );
215+ copy_field (* (record -> raw_uni_path ), buf ,
216+ UNICODE_FILENAME_OFFSET , UNICODE_RECORD_SIZE );
214217 null_terminator_offset = ucs2_strnlen (
215218 record -> raw_uni_path , WIN_PATH_MAX ) * sizeof (gunichar2 );
216219
0 commit comments