carvel-dev / imgpkg

Store application configuration files in Docker/OCI registries
https://carvel.dev/imgpkg
Apache License 2.0
263 stars 63 forks source link

Limit session IDs to a non-negative, pseudo-random int32 #664

Closed mamachanko closed 6 months ago

mamachanko commented 6 months ago

Technically, this reduces the set from which session IDs are drawn by (9.999.999.999 - 2.147.483.647) = 7.852.516.352, say 75%.

Practically, ~2e10 possible session IDs should be large enough to avoid collisions in the real-world.

This fixes an int overflow for 386 architectures.

Fixes #663