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

http2: remove unsupported %.* specifier #35694

Closed
wants to merge 1 commit into from

Conversation

mmomtchev
Copy link
Contributor

The debug sprintf doesn't support %.* specifiers

Fixes: #35688

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

The debug sprintf doesn't support %.* specifiers

Fixes: nodejs#35688
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/http2
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. http2 Issues or PRs related to the http2 subsystem. labels Oct 17, 2020
@codecov-io
Copy link

Codecov Report

Merging #35694 into master will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #35694   +/-   ##
=======================================
  Coverage   96.40%   96.40%           
=======================================
  Files         220      220           
  Lines       73681    73681           
=======================================
+ Hits        71031    71032    +1     
+ Misses       2650     2649    -1     
Impacted Files Coverage Δ
lib/_http_server.js 98.45% <0.00%> (+0.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9ce5a03...1d354d4. Read the comment docs.

@mscdex
Copy link
Contributor

mscdex commented Oct 17, 2020

Are we sure this is safe?

According to the documentation (emphasis mine):

The msg is typically NULL-terminated string of length len.

Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

@mscdex Currently, this is always true, yes, and I think changing this would have to be considered a breaking change on the nghttp2 side

@Trott
Copy link
Member

Trott commented Oct 18, 2020

Non-blocking naive questions: Can we/should we add a test? A lint rule? An assertion or other check/confirmation of NULL-termination?

@addaleax
Copy link
Member

Can we/should we add a test?

I would not add a test for specific debugging statements.

A lint rule?

That would be great, but it might be quite a bit of effort.

An assertion or other check/confirmation of NULL-termination?

I don’t see any issue with adding DCHECK_LE(strlen(message), len);.

@rickyes rickyes added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 20, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 20, 2020
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@devnexen devnexen added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 21, 2020
@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 24, 2020
@github-actions github-actions bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 24, 2020
@github-actions
Copy link
Contributor

Landed in c5b9b5b...7083425

@github-actions github-actions bot closed this Oct 24, 2020
nodejs-github-bot pushed a commit that referenced this pull request Oct 24, 2020
The debug sprintf doesn't support %.* specifiers

Fixes: #35688

PR-URL: #35694
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
targos pushed a commit that referenced this pull request Nov 3, 2020
The debug sprintf doesn't support %.* specifiers

Fixes: #35688

PR-URL: #35694
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
@targos targos mentioned this pull request Nov 3, 2020
BethGriggs pushed a commit that referenced this pull request Dec 8, 2020
The debug sprintf doesn't support %.* specifiers

Fixes: #35688

PR-URL: #35694
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
BethGriggs pushed a commit that referenced this pull request Dec 10, 2020
The debug sprintf doesn't support %.* specifiers

Fixes: #35688

PR-URL: #35694
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
@BethGriggs BethGriggs mentioned this pull request Dec 10, 2020
BethGriggs pushed a commit that referenced this pull request Dec 15, 2020
The debug sprintf doesn't support %.* specifiers

Fixes: #35688

PR-URL: #35694
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. http2 Issues or PRs related to the http2 subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

%.* is not a supported debug specifier
10 participants