X Tutup
The Wayback Machine - https://web.archive.org/web/20201025230948/https://github.com/nodejs/node/pull/35694
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

@mmomtchev mmomtchev commented Oct 17, 2020

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: #35688
@nodejs-github-bot
Copy link

@nodejs-github-bot nodejs-github-bot commented Oct 17, 2020

Review requested:

@codecov-io
Copy link

@codecov-io codecov-io commented Oct 17, 2020

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 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

@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 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

@addaleax addaleax commented Oct 18, 2020

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);.

@Trott
Trott approved these changes Oct 19, 2020
@rickyes rickyes added the request-ci label Oct 20, 2020
@github-actions github-actions bot removed the request-ci label Oct 20, 2020
@github-actions
Copy link

@github-actions github-actions bot commented Oct 24, 2020

Landed in c5b9b5b...7083425

@github-actions github-actions bot closed this Oct 24, 2020
nodejs-github-bot added 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

10 participants
You can’t perform that action at this time.
X Tutup