[haiku-commits] haiku: hrev53489 - src/kits/app

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 14 Sep 2019 16:06:25 -0400 (EDT)

hrev53489 adds 1 changeset to branch 'master'
old head: 4015b5877f668e870c12f4214af98078eed3b4e3
new head: d761df9f70fd928c5423e35330e327a63e0e24f5
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=d761df9f70fd+%5E4015b5877f66

----------------------------------------------------------------------------

d761df9f70fd: BMessage: fix NULL pointer dereference in out of memory condition.
  
  Change-Id: I75ba6e5069cda8a92fd88bf7d1e999232359e73c
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1864
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53489
Commit:      d761df9f70fd928c5423e35330e327a63e0e24f5
URL:         https://git.haiku-os.org/haiku/commit/?id=d761df9f70fd
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Sat Sep 14 19:25:49 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Sat Sep 14 20:06:18 2019 UTC

----------------------------------------------------------------------------

1 file changed, 3 insertions(+), 2 deletions(-)
src/kits/app/Message.cpp | 5 +++--

----------------------------------------------------------------------------

diff --git a/src/kits/app/Message.cpp b/src/kits/app/Message.cpp
index a111a294bf..b4a411f34b 100644
--- a/src/kits/app/Message.cpp
+++ b/src/kits/app/Message.cpp
@@ -165,8 +165,9 @@ BMessage::BMessage(BMessage* other)
 BMessage::BMessage(uint32 _what)
 {
        DEBUG_FUNCTION_ENTER;
-       _InitCommon(true);
-       fHeader->what = what = _what;
+       if (_InitCommon(true))
+               fHeader->what = _what;
+       what = _what;
 }
 
 


Other related posts:

  • » [haiku-commits] haiku: hrev53489 - src/kits/app - waddlesplash