We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8499e9f commit be4dc93Copy full SHA for be4dc93
1 file changed
Sources/ContainerizationEXT4/EXT4+Formatter.swift
@@ -1367,8 +1367,12 @@ extension Date {
1367
return 0x8000_0000
1368
}
1369
1370
- if s > 0x3_7fff_ffff {
1371
- return 0x3_7fff_ffff
+ // Bug #23 (HIGH): Upper clamp used 0x3_7fff_ffff instead of the correct EXT4 34-bit
+ // seconds field maximum 0x3_ffff_ffff (2^34 − 1). Values between these two constants
1372
+ // passed unchecked, writing bits above bit 33 and corrupting the nanosecond field.
1373
+ // Same fix: sonnet-fix.
1374
+ if s > 0x3_ffff_ffff {
1375
+ return 0x3_ffff_ffff
1376
1377
1378
// Bug #1 (CRITICAL): UInt64(s) traps with a Swift runtime precondition failure when s is
0 commit comments