High Sierra b9 > Bug in xar source code with APFS volumes

Originator:dev.iceberg
Number:rdar://34354809 Date Originated:09/10/2017
Status:Open Resolved:
Product:macOS Product Version:10.13
Classification:Serious Bug Reproducible:Always
 
Area:
Something not on this list

Summary:

There's a bug in xar latest public source code (https://opensource.apple.com/source/xar/xar-357/xar/lib/darwinattr.c.auto.html) and as far as I can tell, the problem is also in the version used in High Sierra.

In the stragglers_archive function, the fits struct is not declared as packed. This leads to issue when dealing with files on a APFS volume (and maybe HFS+ too) as the returned value is random and so the FinderCreateTime property will contains incorrect values such as:

 
     402096012-07-25T21:56:16 
     123145302310912 
 

Steps to Reproduce:

1. Look at the source of the stragglers_archive function.

Expected Results:

The struct should be packed. Personally, I didn't know this. Someone else pointed out the issue.

Actual Results:

The struct is not packed. 

Version/Build:

xar-357 and High Sierra b9.

Configuration:

MacBook Pro Retina

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!