Skip to content

Conversation

@fstromback
Copy link
Contributor

The expression sizeof('\0') evaluates to sizeof(int), which does not reflect the intent in the code. It has been replaced with 1 /* NUL */ for clarity.

This issue was originally reported by наб [email protected] who also proposed this patch.

Fixes #276

The expression `sizeof('\0')` evaluates to `sizeof(int)`, which does not reflect
the intent in the code. It has been replaced with `1 /* NUL */` for clarity.

This issue was originally reported by наб <[email protected]>
who also proposed this patch.
@thejayps thejayps added the essential Will cause failure to meet customer requirements. Assign resources. label Jan 10, 2024
@rptb1 rptb1 added the low risk This work is or would be of low risk of introducing defects. label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

essential Will cause failure to meet customer requirements. Assign resources. low risk This work is or would be of low risk of introducing defects.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Usage of sizeof('\0') for computing the size of string terminators

3 participants