Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a354091

Browse filesBrowse files
bnoordhuisMylesBorins
authored andcommitted
crypto: fix length argument to snprintf()
Introduced in commit d3d6cd3 ("src: improve SSL version extraction logic".) PR-URL: #23622 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Hitesh Kanwathirtha <digitalinfinity@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
1 parent b3e43a6 commit a354091
Copy full SHA for a354091

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎src/node_crypto.cc‎

Copy file name to clipboardExpand all lines: src/node_crypto.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5756,7 +5756,7 @@ std::string GetOpenSSLVersion() {
57565756
const int start = search(OPENSSL_VERSION_TEXT, 0, ' ') + 1;
57575757
const int end = search(OPENSSL_VERSION_TEXT + start, start, ' ') + 1;
57585758
const int len = end - start;
5759-
snprintf(buf, len, "%.*s\n", len, &OPENSSL_VERSION_TEXT[start]);
5759+
snprintf(buf, sizeof(buf), "%.*s\n", len, &OPENSSL_VERSION_TEXT[start]);
57605760
return std::string(buf);
57615761
}
57625762

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.