Skip to content

Conversation

@giuseppe
Copy link
Member

In the generated C code for cloning the object values of a mapStringObject, an 'if' statement checking for cloning failure was followed by an erroneous semicolon.

This caused the 'if' to have an empty body, leading to the subsequent 'return NULL;' being executed unconditionally in the first iteration of the value-cloning loop if the map was not empty. Consequently, cloning a mapStringObject with one or more elements would always fail prematurely when this specific path for object-values was taken.

Removing the semicolon makes the 'return NULL;' conditional upon actual cloning failure, as intended.

In the generated C code for cloning the object values of a
mapStringObject, an 'if' statement checking for cloning failure
was followed by an erroneous semicolon.

This caused the 'if' to have an empty body, leading to the
subsequent 'return NULL;' being executed unconditionally in
the first iteration of the value-cloning loop if the map
was not empty. Consequently, cloning a mapStringObject with
one or more elements would always fail prematurely when this
specific path for object-values was taken.

Removing the semicolon makes the 'return NULL;' conditional
upon actual cloning failure, as intended.

Signed-off-by: Giuseppe Scrivano <[email protected]>
@giuseppe
Copy link
Member Author

merging it as an obvious fix as it was reported by the compiler

@giuseppe giuseppe merged commit 6839732 into containers:main May 16, 2025
6 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.

1 participant