mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-15 04:18:03 +00:00
Size computation for allocation may overflow (#99)
* Size computation for allocation may overflow Performing calculations involving the size of potentially large strings or slices can result in an overflow (for signed integer types) or a wraparound (for unsigned types). An overflow causes the result of the calculation to become negative, while a wraparound results in a small (positive) number.
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
package redis
|
||||
|
||||
import (
|
||||
"github.com/redis/go-redis/v9/push"
|
||||
)
|
||||
|
||||
// NewPushNotificationProcessor creates a new push notification processor
|
||||
// This processor maintains a registry of handlers and processes push notifications
|
||||
// It is used for RESP3 connections where push notifications are available
|
||||
func NewPushNotificationProcessor() push.NotificationProcessor {
|
||||
return push.NewProcessor()
|
||||
}
|
||||
|
||||
// NewVoidPushNotificationProcessor creates a new void push notification processor
|
||||
// This processor does not maintain any handlers and always returns nil for all operations
|
||||
// It is used for RESP2 connections where push notifications are not available
|
||||
// It can also be used to disable push notifications for RESP3 connections, where
|
||||
// it will discard all push notifications without processing them
|
||||
func NewVoidPushNotificationProcessor() push.NotificationProcessor {
|
||||
return push.NewVoidProcessor()
|
||||
}
|
||||
Reference in New Issue
Block a user