Last Comment Bug 684485 - crash in nsAbCardProperty::SetPropertyAsAString before trying to use nsDependentCString
: crash in nsAbCardProperty::SetPropertyAsAString before trying to use nsDepend...
Status: RESOLVED FIXED
: crash
Product: MailNews Core
Classification: Components
Component: Address Book (show other bugs)
: Trunk
: x86_64 Windows 7
: -- critical (vote)
: Thunderbird 18.0
Assigned To: :aceman
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-03 05:04 PDT by Wayne Mery (:wsmwk, NI for questions)
Modified: 2012-09-04 13:59 PDT (History)
7 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (4.07 KB, patch)
2012-08-30 12:26 PDT, :aceman
mconley: review+
Details | Diff | Review

Description Wayne Mery (:wsmwk, NI for questions) 2011-09-03 05:04:17 PDT
+++ This bug was initially created as a clone of Bug #684481 +++

crash in nsAbCardProperty::SetPropertyAsAString before trying to use nsDependentCString

bp-009cd991-f43b-45e2-8d7e-ca14b2110831
EXCEPTION_ACCESS_VIOLATION_READ
0x0
0	mozcrt19.dll	strlen	strlen.asm:81
1	xul.dll	nsDependentCString::nsDependentCString	objdir-tb/mozilla/dist/include/nsTDependentString.h:90
2	xul.dll	nsAbCardProperty::SetPropertyAsAString	mailnews/addrbook/src/nsAbCardProperty.cpp:314
3	xul.dll	nsAddrDatabase::InitCardFromRow	mailnews/addrbook/src/nsAddrDatabase.cpp:2473
4	xul.dll	nsAddrDatabase::CreateCard	mailnews/addrbook/src/nsAddrDatabase.cpp:2966
5	xul.dll	nsAddrDatabase::GetCardFromAttribute	mailnews/addrbook/src/nsAddrDatabase.cpp:3161
6	xul.dll	nsAbMDBDirectory::CardForEmailAddress	mailnews/addrbook/src/nsAbMDBDirectory.cpp:1086
Comment 1 Mark Banner (:standard8) 2011-09-05 01:48:25 PDT
I was going to suggest an add-on issue, however, this looks like the column name in the mork file is "".

Not sure if David or Mike have any ideas here, but a starter would be to add a NS_ENSURE_ARG_POINTER to SetPropertyAsString (and related functions in that file) - which we should probably have anyway, as xpcom rules require us to be able to handle null.
Comment 2 :aceman 2012-08-30 12:26:01 PDT
Created attachment 656989 [details] [diff] [review]
patch
Comment 3 Mike Conley (:mconley) - (Away until June 29th) 2012-09-04 07:59:22 PDT
Comment on attachment 656989 [details] [diff] [review]
patch

Review of attachment 656989 [details] [diff] [review]:
-----------------------------------------------------------------

Yep, this looks like the right thing to do. Thanks aceman!
Comment 4 Mark Banner (:standard8) 2012-09-04 12:20:16 PDT
Comment on attachment 656989 [details] [diff] [review]
patch

Yep, if we're not getting a name, erroring out is the right thing to do.
Comment 5 Ryan VanderMeulen [:RyanVM] 2012-09-04 13:59:13 PDT
https://hg.mozilla.org/comm-central/rev/721cec51e685

Note You need to log in before you can comment on or make changes to this bug.