-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fixing up PNGOutputter issues #13753
Conversation
@@ -280,7 +279,7 @@ PNGOutput::makePNG() | |||
Real width = dist_x * _resolution; | |||
Real height = dist_y * _resolution; | |||
// Allocate resources. | |||
std::vector<png_byte> row((width * 4) + 1); | |||
std::vector<png_byte> row((width + 1) * 4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cause of running out of bounds...
@@ -348,7 +347,7 @@ PNGOutput::makePNG() | |||
if (infop != nullptr) | |||
png_free_data(pngp, infop, PNG_FREE_ALL, -1); | |||
if (pngp != nullptr) | |||
png_destroy_write_struct(&pngp, (png_infopp) nullptr); | |||
png_destroy_write_struct(&pngp, &infop); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaking the info struct...
FYI @Hysrok - This commit fixes up a few issues with the outputted that is preventing it from getting merged into the devel branch. Let me know if you have any questions. There were two memory issues. |
- PNGOutputter restricted to work in dynaimc linkage mode only due to unresolved linkage problem with the library in static mode - Some constness added to member variables - Memory issue fixed refs idaholab#13646
Job Documentation on d2d9331 wanted to post the following: View the site here This comment will be updated on new commits. |
due to unresolved linkage problem with the library in static mode
refs #13646