Skip to content

Commit

Permalink
addressed security issues flagged on GitHub.
Browse files Browse the repository at this point in the history
2 unit tests failed... but they failed before the code change
  • Loading branch information
ChemMitch committed Jan 3, 2024
1 parent 2435862 commit 01eab1c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>gov.nih.ncats</groupId>
<artifactId>molvec</artifactId>
<packaging>jar</packaging>
<version>0.9.9-SNAPSHOT</version>
<version>0.9.10-SNAPSHOT</version>
<name>MolVec</name>


Expand Down
4 changes: 2 additions & 2 deletions src/main/java/gov/nih/ncats/molvec/internal/image/Bitmap.java
Original file line number Diff line number Diff line change
Expand Up @@ -2064,10 +2064,10 @@ void union (short[] eqvtab, short cls1, short cls2) {

if (i != j) {
if (eqvtab[j] < eqvtab[i]) {
eqvtab[j] += eqvtab[i] - 1;
eqvtab[j] += eqvtab[i] - (short)1;

Check failure

Code scanning / CodeQL

Implicit narrowing conversion in compound assignment High

Implicit cast of source type int to narrower destination type short.
eqvtab[i] = j;
} else {
eqvtab[i] += eqvtab[j] - 1;
eqvtab[i] += eqvtab[j] - (short)1;

Check failure

Code scanning / CodeQL

Implicit narrowing conversion in compound assignment High

Implicit cast of source type int to narrower destination type short.
eqvtab[j] = i;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5882,7 +5882,7 @@ public static List<Object[]> data(){
list.add(new Object[]{"alphaPro", new TestSpec("moleculeTest/alpha_problem2.png", c->{
Chemical cReal=ChemicalBuilder.createFromSmiles("C=C(C)C1CCC(C)=CC1").build();
String keyReal=Inchi.asStdInchi(cReal).getKey();
String keyGot=Inchi.asStdInchi(c).getKey();
String keyGot=Inchi.asStdInchi(c).getKey();
assertEquals(keyReal,keyGot);
} )});

Expand Down

0 comments on commit 01eab1c

Please sign in to comment.