Skip to content

fix: prevent potential null pointer dereference in ValueDescDisconnect action - #3458

Merged
ice0 merged 1 commit into
synfig:masterfrom
rodolforg:fix-possible-nullptr-defer
Jan 27, 2025
Merged

ice0 merged 1 commit into
synfig:masterfrom
rodolforg:fix-possible-nullptr-defer

Conversation

@rodolforg

@rodolforg rodolforg commented Nov 28, 2024 •

Copy link
Copy Markdown
Contributor

Also this fixes MSYS2 MinGW warning:

/synfig-studio/src/synfigapp/actions/valuedescdisconnect.cpp:122:104:
C:/msys64/mingw64/include/c++/14.2.0/bits/atomic_base.h:501:31: warning: 'unsigned int __atomic_load_4(const volatile void*, int)' writing 4 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
  501 |         return __atomic_load_n(&_M_i, int(__m));
      |                ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
In static member function 'static bool synfigapp::Action::ValueDescDisconnect::is_candidate(const synfigapp::Action::ParamList&)':
cc1plus.exe: note: destination object is likely at address zero

@github-actions

Copy link
Copy Markdown

Thank you for contributing!
Below is how your contribution will appear in Synfig's release notes. Review it and improve your pull request's title and description so that your contribution is clear. You can add images, videos, and anything else you want. Have fun!

🐞 Bug Fixes

  • Avoid possibility of de-referencing a null pointer

@ice0 ice0 changed the title fix: avoid possibility of de-referencing a null pointer fix: prevent potential null pointer dereference Jan 27, 2025
@ice0 ice0 changed the title fix: prevent potential null pointer dereference fix: prevent potential null pointer dereference in ValueDescDisconnect action Jan 27, 2025
@synfig synfig deleted a comment from github-actions Bot Jan 27, 2025
@github-actions

Copy link
Copy Markdown

Thank you for attempting to improve your contribution description!
Below is how your updated contribution will appear in Synfig's release notes. Review it and make further improvements until you're satisfied!

🐞 Bug Fixes

  • Prevent potential null pointer dereference in ValueDescDisconnect action

    Also this fixes MSYS2 MinGW warning:

    /synfig-studio/src/synfigapp/actions/valuedescdisconnect.cpp:122:104:  
    C:/msys64/mingw64/include/c++/14.2.0/bits/atomic_base.h:501:31: warning: 'unsigned int __atomic_load_4(const volatile void*, int)' writing 4 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]  
      501 |         return __atomic_load_n(&_M_i, int(__m));  
          |                ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~  
    In static member function 'static bool synfigapp::Action::ValueDescDisconnect::is_candidate(const synfigapp::Action::ParamList&)':  
    cc1plus.exe: note: destination object is likely at address zero  

@synfig synfig deleted a comment from github-actions Bot Jan 27, 2025
@ice0
ice0 merged commit 484662d into synfig:master Jan 27, 2025
@ice0

ice0 commented Jan 27, 2025

Copy link
Copy Markdown
Collaborator

Merged. Thank you!

@rodolforg
rodolforg deleted the fix-possible-nullptr-defer branch January 30, 2025 05:53
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