GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: improve SPKAC::ExportChallenge() · nodejs/node@1196023

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/crypto
    • crypto_spkac.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/crypto/crypto_spkac.cc‎

Copy file name to clipboardExpand all lines: src/crypto/crypto_spkac.cc
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,9 @@ ByteSource ExportChallenge(const ArrayBufferOrViewContents<char>& input) {
9999
if (!sp)
100100
return ByteSource();
101101

102-
char* buf = nullptr;
103-
ASN1_STRING_to_UTF8(
104-
reinterpret_cast<unsigned char**>(&buf),
105-
sp->spkac->challenge);
106-
107-
return ByteSource::Allocated(buf, strlen(buf));
102+
unsigned char* buf = nullptr;
103+
int buf_size = ASN1_STRING_to_UTF8(&buf, sp->spkac->challenge);
104+
return (buf_size >= 0) ? ByteSource::Allocated(buf, buf_size) : ByteSource();
108105
}
109106

110107
void ExportChallenge(const FunctionCallbackInfo<Value>& args) {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.