We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9f462f commit 50110d0Copy full SHA for 50110d0
1 file changed
Sources/ContainerizationEXT4/EXT4+Formatter.swift
@@ -1372,8 +1372,12 @@ extension Date {
1372
return 0x8000_0000
1373
}
1374
1375
- if s > 0x3_7fff_ffff {
1376
- 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
1377
+ // passed unchecked, writing bits above bit 33 and corrupting the nanosecond field.
1378
+ // Same fix: sonnet-fix.
1379
+ if s > 0x3_ffff_ffff {
1380
+ return 0x3_ffff_ffff
1381
1382
1383
// Bug #1 (CRITICAL): UInt64(s) traps with a Swift runtime precondition failure when s is
0 commit comments