mirror of https://github.com/containers/podman.git
The JSON decoder correctly cannot decode (overflow) negative values (e.g., `-1`) for fields of type `uint64`, as `-1` is used to represent `max` in `POSIXRlimit`. To handle this, we use `tmpSpecGenerator` to decode the request body. The `tmpSpecGenerator` replaces the `POSIXRlimit` type with a `tmpRlimit` type that uses the `json.Number` type for decoding values. The `tmpRlimit` is then converted into the `POSIXRlimit` type and assigned to the `SpecGenerator`. This approach ensures compatibility with the Podman CLI and remote API, which already handle `-1` by casting it to `uint64` (`uint64(-1)` equals `MaxUint64`) to signify `max`. Fixes: https://issues.redhat.com/browse/RUN-2859 Fixes: https://github.com/containers/podman/issues/24886 Signed-off-by: Jan Rodák <hony.com@seznam.cz> |
||
|---|---|---|
| .. | ||
| containers.go | ||
| containers_create.go | ||
| containers_stats.go | ||
| generate.go | ||
| healthcheck.go | ||
| images.go | ||
| images_pull.go | ||
| images_push.go | ||
| info.go | ||
| kube.go | ||
| kube_test.go | ||
| manifests.go | ||
| networks.go | ||
| play.go | ||
| pods.go | ||
| secrets.go | ||
| swagger_spec.go | ||
| system.go | ||
| volumes.go | ||