Skip to content
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

Fixes for errors in the "array_ptr" interfaces to some libc functions declared in checkedc_extensions.h, and removal of the conditional in the snprintf declaration in stdio_checked.h #456

Merged
merged 6 commits into from
Jun 11, 2021

Conversation

sulekhark
Copy link
Contributor

@sulekhark sulekhark commented Jun 7, 2021

This PR contains fixes for issues #449 and #450. They are, in brief:

  1. link-time errors caused by declaring strncmp_array_ptr as extern inline,
  2. missing definition for snprintf_array_ptr, and
  3. inconsistency between the second argument of snprintf (i.e. the argument n) and the bounds declaration for the first argument of snprintf (i.e., the argument s) when n == 0.

@sulekhark sulekhark marked this pull request as draft June 7, 2021 14:24

#pragma CHECKED_SCOPE on

#include <stddef.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can these headers be listed alphabetically?

@@ -6,6 +6,7 @@

#include <stdlib_checked.h>
#include <string_checked.h>
#include <stdarg.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can these headers be listed alphabetically?

Copy link
Contributor

@mgrang mgrang left a comment

Choose a reason for hiding this comment

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

LGTM.

@mgrang
Copy link
Contributor

mgrang commented Jun 10, 2021

Could you please add a title describing the changes?

Copy link
Contributor

@kkjeer kkjeer left a comment

Choose a reason for hiding this comment

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

LGTM.

@sulekhark sulekhark changed the title Issues 449 450 Fixes for errors in the "array_ptr" interfaces to some libc functions declared in checkedc_extensions.h Jun 11, 2021
@mattmccutchen-cci
Copy link
Contributor

Ideally, the new PR title would encompass the removal of the conditional from snprintf (#450) as well as the checkedc_extensions.h changes (#449). Sulekha, would you be willing to change it?

Copy link
Contributor

@mgrang mgrang left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@sulekhark
Copy link
Contributor Author

Ideally, the new PR title would encompass the removal of the conditional from snprintf (#450) as well as the checkedc_extensions.h changes (#449). Sulekha, would you be willing to change it?

Yes, of course.

@sulekhark sulekhark changed the title Fixes for errors in the "array_ptr" interfaces to some libc functions declared in checkedc_extensions.h Fixes for errors in the "array_ptr" interfaces to some libc functions declared in checkedc_extensions.h, and removal of the conditional in the snprintf declaration in stdio_checked.h Jun 11, 2021
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.

None yet

4 participants