Skip to content

fix nil pointer in s3 list api #4412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2024
Merged

Conversation

jkroepke
Copy link
Contributor

@jkroepke jkroepke commented Jul 19, 2024

Fixes #4411
Ref: project-zot/zot#2532

On other situations, a nil check is present.

if resp.IsTruncated == nil || !*resp.IsTruncated {


There are still some missing nil checks, not sure

for *partsList.IsTruncated {

if key != *multi.Key {

if *resp.Contents[0].Key != s3Path {

Size: *resp.ContentLength,
ModTime: *resp.LastModified,

return d.newWriter(ctx, key, *resp.UploadId, nil), nil

Signed-off-by: Jan-Otto Kröpke <github@jkroepke.de>
@milosgajdos milosgajdos merged commit 2577121 into distribution:main Jul 19, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

S3 driver: panic: runtime error: invalid memory address or nil pointer dereference
3 participants