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 bounds check in get_diag_buffer #1160

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

rem1776
Copy link
Contributor

@rem1776 rem1776 commented Mar 15, 2023

Description
fixes the bounds check and replaces the module level variable with this.

Part of the reason I wrote it this way is because fmsDiagObject_type is public so there's nothing guaranteeing that this routine will only be called on fms_diag_object (the module's instance) and not any other new instances of the type.

I guess it's really just a scoping issue but we could potentially add checks that this matches up memory address-wise to fms_diag_object to avoid this or change some public/private declarations.

How Has This Been Tested?
oneapi 2023.0 on amd

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included
  • make distcheck passes

@thomas-robinson thomas-robinson merged commit 6d01975 into NOAA-GFDL:dmUpdate Apr 6, 2023
rem1776 added a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 added a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 added a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 added a commit to rem1776/FMS that referenced this pull request May 1, 2024
rem1776 added a commit to rem1776/FMS that referenced this pull request May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants