提交 bb2276ab 编写于 作者: B Bodo Möller

Avoid potential memory leak in code generated by 'openssl dhparam -C'.

上级 41918458
...@@ -464,7 +464,7 @@ bad: ...@@ -464,7 +464,7 @@ bad:
printf("\tdh->g=BN_bin2bn(dh%d_g,sizeof(dh%d_g),NULL);\n", printf("\tdh->g=BN_bin2bn(dh%d_g,sizeof(dh%d_g),NULL);\n",
bits,bits); bits,bits);
printf("\tif ((dh->p == NULL) || (dh->g == NULL))\n"); printf("\tif ((dh->p == NULL) || (dh->g == NULL))\n");
printf("\t\treturn(NULL);\n"); printf("\t\t{ DH_free(dh); return(NULL); }\n");
if (dh->length) if (dh->length)
printf("\tdh->length = %d\n", dh->length); printf("\tdh->length = %d\n", dh->length);
printf("\treturn(dh);\n\t}\n"); printf("\treturn(dh);\n\t}\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册