Skip to content

Add protection against memory allocation failure in Color balance RGB - #22099

Merged
TurboGit merged 1 commit into
darktable-org:masterfrom
victoryforce:check-allocation-in-colorbalancergb
Sep 1, 2026
Merged

Add protection against memory allocation failure in Color balance RGB#22099
TurboGit merged 1 commit into
darktable-org:masterfrom
victoryforce:check-allocation-in-colorbalancergb

Conversation

@victoryforce

Copy link
Copy Markdown
Collaborator

We have to check malloc result to prevent NULL-dereferencing and crash.

In this case, the graph in the mask tab remains undrawn. Although the graph is allocated a relatively large amount (not just a few hundred bytes like for some data structure), it is not many megabytes like for image buffers. Accordingly, the probability of not allocating memory of such a limited size is quite small and, in my opinion, it is enough to save the program from crashing, and adding text for dt_control_log probably does not make much practical sense.

For the same reason, this fix is ​​not important enough to be mentioned in the release notes.

@TurboGit TurboGit added this to the 5.8 milestone Aug 31, 2026

@TurboGit TurboGit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@TurboGit TurboGit added the bugfix pull request fixing a bug label Sep 1, 2026
@TurboGit
TurboGit merged commit c9cddbf into darktable-org:master Sep 1, 2026
6 checks passed
@victoryforce
victoryforce deleted the check-allocation-in-colorbalancergb branch September 1, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix pull request fixing a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants