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

Resolves #1509 fortify findings with feature addition to point2grid #1526

Merged
merged 7 commits into from Oct 20, 2020

Conversation

hsoh-u
Copy link
Collaborator

@hsoh-u hsoh-u commented Oct 17, 2020

Pull Request Testing

  • Describe testing already performed for these changes:

  • Recommend testing for the reviewer to perform, including the location of input datasets:

  • Will this PR result in changes to the test suite? No

    If yes, describe the new output and/or changes to the existing output:

  • After merging, should the reviewer DELETE the feature branch from GitHub? Yes

Pull Request Checklist

See the METplus Workflow for details.

  • Complete the PR definition above.

  • Ensure the PR title matches the feature or bugfix branch name.

  • Define the PR metadata, as permissions allow.
    Select: Reviewer(s), Project(s), and Milestone

  • After submitting the PR, select Linked Issues with the original issue number.

  • nccf_file.cc: removed the same if statements

  • met/src/libcode/vx_nc_util/nc_utils.cc

    • Memory leak: release nc_att & att_fill_value
  • met/src/libcode/vx_nc_util/nc_utils.h: corrected arg names (not related with Fortify)

  • met/src/tools/other/pb2nc/pb2nc.cc: Fortify detected a memory leak, but it was not true. The releasing memory was implemented differently, (not sure Fortify will recognize this)

    • removed unused local variables
  • met/src/tools/core/point_stat/point_stat.cc : removed an unused local variable

  • met/src/tools/other/pb2nc/pb2nc.cc: corrected memory leak of from_data by moving inner block

    • removed unused local variables
    • buffer overflow: identified where it happens but not fixed because (I think) two_to_one() API prevents from overflow

@hsoh-u hsoh-u added this to the MET 10.0 milestone Oct 17, 2020
@hsoh-u hsoh-u added this to In progress in MET-10.0.0-beta1 (10/22/20) via automation Oct 17, 2020
@hsoh-u hsoh-u linked an issue Oct 17, 2020 that may be closed by this pull request
21 tasks
Copy link
Collaborator

@JohnHalleyGotway JohnHalleyGotway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve of this change. Here's what I tested:

  • compiled code for PR on kiowa in /d1/projects/MET/MET_pull_requests/met-10.0_beta1/bugfix_1509
  • ran unit tests... all ran without error
  • diffed output with previous NB output... no diffs

I don't know how many of the Fortify findings these changes actually resolve, but the automated nightly run script will email us tomorrow if/when the Fortify counts change.

@JohnHalleyGotway JohnHalleyGotway merged commit 3b14c14 into develop Oct 20, 2020
MET-10.0.0-beta1 (10/22/20) automation moved this from In progress to Done Oct 20, 2020
@JohnHalleyGotway JohnHalleyGotway deleted the bugfix_1509_fortify_point2grid branch October 20, 2020 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Fix Fortify findings caused by point2grid changes in #1345.
2 participants