We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4330d7c + 2491763 commit 8c40e86Copy full SHA for 8c40e86
src/x509/clu_cert_setup.c
@@ -786,13 +786,15 @@ int wolfCLU_certSetup(int argc, char** argv)
786
/* write out certificate */
787
if (ret == WOLFCLU_SUCCESS && !nooutFlag) {
788
byte* derBuf = inBuf;
789
+ byte* pt; /* use pt with i2d to handle potential pointer increment */
790
int derBufSz = inBufSz;
791
792
/* if inform is PEM we convert to DER for excluding input that is not
793
* part of the certificate */
794
if (inForm == PEM_FORM) {
795
if (reqFlag) {
- derBufSz = wolfSSL_i2d_X509(x509, &derBuf);
796
+ pt = derBuf;
797
+ derBufSz = wolfSSL_i2d_X509(x509, &pt);
798
}
799
else {
800
derBuf = derObj->buffer;
0 commit comments