Skip to content

Commit

Permalink
Fixed security issues detected by CodeQL
Browse files Browse the repository at this point in the history
  • Loading branch information
salmonb committed Oct 13, 2023
1 parent 597a87c commit e7e8968
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ public ScrollPane(Node content) {
protected void sceneToLocal(com.sun.javafx.geom.Point2D pt) {
super.sceneToLocal(pt);
Bounds viewportBounds = getViewportBounds();
pt.x += viewportBounds.getMinX();
pt.y += viewportBounds.getMinY();
pt.x += (/*cast to fix CodeQL implicit-cast-in-compound-assignment security issue*/float) viewportBounds.getMinX();
pt.y += (/*cast to fix CodeQL implicit-cast-in-compound-assignment security issue*/float) viewportBounds.getMinY();
}

@Override
protected void localToScene(com.sun.javafx.geom.Point2D pt) {
Bounds viewportBounds = getViewportBounds();
pt.x -= viewportBounds.getMinX();
pt.y -= viewportBounds.getMinY();
pt.x -= (/*cast to fix CodeQL implicit-cast-in-compound-assignment security issue*/float) viewportBounds.getMinX();
pt.y -= (/*cast to fix CodeQL implicit-cast-in-compound-assignment security issue*/float) viewportBounds.getMinY();
super.localToScene(pt);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ void impl_jumpTo(long currentTicks, long cycleTicks, boolean forceJump) {

offsetTicks[i] = (getCurrentRate() > 0)? newTicks - delays[i] : add(durations[i], delays[i]) - newTicks;
} else if (status == Status.PAUSED) {
offsetTicks[i] += (newTicks - oldTicks) * Math.signum(this.clipEnvelope.getCurrentRate());
offsetTicks[i] += (/*cast to fix CodeQL implicit-cast-in-compound-assignment security issue*/long) ((newTicks - oldTicks) * Math.signum(this.clipEnvelope.getCurrentRate()));
} else {
offsetTicks[i] += (getCurrentRate() > 0) ? newTicks - oldTicks : oldTicks - newTicks;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ private boolean startChild(Animation child, int index) {
}
if (oldIndex == curIndex) {
if (currentRate == 0) {
offsetTicks += (newTicks - oldTicks) * Math.signum(this.clipEnvelope.getCurrentRate());
offsetTicks += (/*cast to fix CodeQL implicit-cast-in-compound-assignment security issue*/long) ((newTicks - oldTicks) * Math.signum(this.clipEnvelope.getCurrentRate()));
} else {
offsetTicks += currentRate > 0 ? newTicks - oldTicks : oldTicks - newTicks;
}
Expand Down

0 comments on commit e7e8968

Please sign in to comment.