Unverified Commit 6646d96d authored by Christine Kim's avatar Christine Kim Committed by GitHub
Browse files

Check if history blob buffer is null before executing memcpy (#5205)

* Check if history blob buffer is null before executing memcpy

* Updated CHANGELOG
parent 05a90e9e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ release.
### Removed

### Fixed
- Updated History constructor to check for invalid BLOB before copying History BLOB to output cube [#4966](https://github.com/DOI-USGS/ISIS3/issues/4966)

## [8.0.0] - 2023-04-19

+5 −1
Original line number Diff line number Diff line
@@ -34,8 +34,12 @@ namespace Isis {
    char *blob_buffer = blob.getBuffer();
    p_bufferSize = blob.Size();
    p_histBuffer = new char[p_bufferSize];

    if (blob_buffer != NULL) {
      // Copy existing history
      memcpy(p_histBuffer, blob_buffer, p_bufferSize);
    }
  }


  //! Destructor