| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6bf688d commit 1196023
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -99,12 +99,9 @@ ByteSource ExportChallenge(const ArrayBufferOrViewContents<char>& input) { | |||
| 99 | 99 | if (!sp) | |
| 100 | 100 | return ByteSource(); | |
| 101 | 101 | ||
| 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(); | ||
| 108 | 105 | } | |
| 109 | 106 | ||
| 110 | 107 | void ExportChallenge(const FunctionCallbackInfo<Value>& args) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments