Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integer overflow #433

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/kbmod/search/psi_phi_array_ds.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ struct PsiPhiArrayMeta {
int num_times = 0;
int width = 0;
int height = 0;
int pixels_per_image = 0;
int num_entries = 0;
long unsigned pixels_per_image = 0;
long unsigned num_entries = 0;
int block_size = 0; // Actual memory used per entry.
long unsigned total_array_size = 0;

Expand Down Expand Up @@ -81,8 +81,8 @@ class PsiPhiArray {
inline int get_num_times() { return meta_data.num_times; }
inline int get_width() { return meta_data.width; }
inline int get_height() { return meta_data.height; }
inline int get_pixels_per_image() { return meta_data.pixels_per_image; }
inline int get_num_entries() { return meta_data.num_entries; }
inline long unsigned get_pixels_per_image() { return meta_data.pixels_per_image; }
inline long unsigned get_num_entries() { return meta_data.num_entries; }
inline long unsigned get_total_array_size() { return meta_data.total_array_size; }
inline int get_block_size() { return meta_data.block_size; }

Expand Down