Skip to content

Commit

Permalink
Fix arithmetic overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Nov 5, 2023
1 parent 263602c commit fcc7253
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Pulse 4.x

## Pulse 4.0.4

- Fix [#217](https://github.com/kean/Pulse/issues/217): arithmetic overflow when the the number of deduplicated data links exceed the size limit

## Pulse 4.0.3

*Aug 27, 2023*
Expand Down
2 changes: 1 addition & 1 deletion Sources/Pulse/LoggerStore/LoggerStore+Entities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public final class LoggerBlobHandleEntity: NSManagedObject {
}

/// A number of requests referencing it.
@NSManaged var linkCount: Int16
@NSManaged var linkCount: Int32

/// The logger inlines small blobs in a separate table in the database which
/// significantly [reduces](https://www.sqlite.org/intern-v-extern-blob.html)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Pulse/LoggerStore/LoggerStore+Model.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ extension LoggerStore {
Attribute(name: "key", type: .binaryDataAttributeType),
Attribute(name: "size", type: .integer32AttributeType),
Attribute(name: "decompressedSize", type: .integer32AttributeType),
Attribute(name: "linkCount", type: .integer16AttributeType),
Attribute(name: "linkCount", type: .integer32AttributeType),
Attribute(name: "rawContentType", type: .stringAttributeType),
Attribute(name: "inlineData", type: .binaryDataAttributeType),
Attribute(name: "isUncompressed", type: .booleanAttributeType)
Expand Down

0 comments on commit fcc7253

Please sign in to comment.