Skip to content

Commit

Permalink
fix read past parameter boundary in difflPDF_mod
Browse files Browse the repository at this point in the history
  • Loading branch information
tnagler committed Dec 16, 2024
1 parent 5f101f7 commit 129c376
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
14 changes: 8 additions & 6 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
Fixes .Rd and STRICT_R_HEADERS issues.

# Test environments
* ubuntu 22.04 (devel)
* Windows Server 2019 (release)
* CRAN win builder (devel)
* CRAN mac builder (devel)
* macOS Catalina 10.15 (devel, release)
* macOS 14.6 (devel, release)

## Check status summary
WARNING NOTE OK
Source packages 0 0 1
Reverse depends 1 4 10

* Warning unrelated to this package.
NOTE OK
Source packages 0 1
Reverse depends 5 11

* Notes unrelated to this package.

5 changes: 3 additions & 2 deletions src/logderiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ void difflPDF_mod(double* u, double* v, int* n, double* param, int* copula, doub
double* nparam = (double *) malloc(2*sizeof(double));

int ncopula;
nparam[0]= -param[0];
nparam[1]= -param[1];
nparam[0]= -param[0];
nparam[1]=0; // only implemented for one parameter families
int i;


Expand All @@ -324,6 +324,7 @@ void difflPDF_mod(double* u, double* v, int* n, double* param, int* copula, doub
for (i = 0; i < *n; ++i) {negu[i] = 1 - u[i];}
difflPDF(negu, v, n, nparam, &ncopula, out);
for(i=0;i<*n;i++){out[i]=-out[i];}

}
else if(((*copula==33) | (*copula==34) | (*copula==36) | (*copula==37) | (*copula==38) | (*copula==39) | (*copula==40))) // 270? rotated copulas
{
Expand Down

0 comments on commit 129c376

Please # to comment.