Skip to content

Commit 6767057

Browse files
committed
GT-3460: Fixing potential divide-by-zero
1 parent cf0c434 commit 6767057

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Ghidra/Framework/Generic/src/main/java/ghidra/util/NumericUtilities.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ public final static long bigIntegerToUnsignedLong(BigInteger value) {
250250
* @return aligned value
251251
*/
252252
public static long getUnsignedAlignedValue(long unsignedValue, long alignment) {
253-
if (unsignedValue % alignment == 0) {
253+
if (alignment == 0 || unsignedValue % alignment == 0) {
254254
return unsignedValue;
255255
}
256256
boolean negative = unsignedValue < 0;

0 commit comments

Comments
 (0)