Skip to content

utils: fix read argument buffer pointer#2123

Merged
giuseppe merged 1 commit into
containers:mainfrom
eriksjolund:fix-buffer-pointer
Jul 7, 2026
Merged

utils: fix read argument buffer pointer#2123
giuseppe merged 1 commit into
containers:mainfrom
eriksjolund:fix-buffer-pointer

Conversation

@eriksjolund

Copy link
Copy Markdown
Contributor

I wrote a small patch to reduce the size of a buffer in the function
int libcrun_initialize_apparmor (libcrun_error_t *err)

After doing that I wanted to see if Google Gemini had any feedback of my change, so I pasted in the new implementation
into the AI tab in https://www.google.com/

Gemini suggested replacing &buf with buf

Side note: I will provide my buffer size reduction patch in another PR

Co-Authored-By: Gemini
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request fixes a bug in src/libcrun/utils.c where the address of buf (&buf) was incorrectly passed to the read system call instead of the buffer pointer itself (buf). There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@giuseppe giuseppe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@giuseppe giuseppe merged commit 14f3964 into containers:main Jul 7, 2026
45 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants