Closed Bug 96322 Opened 25 years ago Closed 24 years ago

Should null protect nsCRT::HashCode()

Categories

(Core :: XPCOM, defect, P3)

x86
All
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: paulkchen, Assigned: dougt)

References

Details

(Keywords: crash)

Attachments

(2 files)

The reason we crash in bug 91726 is because we pass a null for the char* parameter to nsCRT::HashCode(). There are some people who believe that nsCRT::HashCode() should at least not die when given such input.
taking this bug
Assignee: kandrot → pchen
marking p3, minor, and future
Severity: normal → minor
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → Future
Just saw another crash in nsCRT::HashCode - see bug 118492
Severity: minor → normal
*** Bug 118492 has been marked as a duplicate of this bug. ***
From dup: Just saw Mozilla crash in nsCRT::HashCode() GDB output: [...] Program terminated with signal 11, Segmentation fault. [...] (gdb) bt #0 0x40117cb8 in nsCRT::HashCode () from /usr/lib/libxpcom.so #1 0x4011ab31 in nsCStringKey::HashCode () from /usr/lib/libxpcom.so #2 0x4011a08f in PL_HashTableFinalize () from /usr/lib/libxpcom.so #3 0x401c28c6 in PL_HashTableLookup () from /usr/lib/libplds4.so #4 0x4011a455 in nsHashtable::Get () from /usr/lib/libxpcom.so #5 0x4011b48b in nsSupportsHashtable::Get () from /usr/lib/libxpcom.so #6 0x41072f94 in NSGetModule () from /usr/lib/mozilla/components/libjar50.so #7 0x408365a2 in NSGetModule () from /usr/lib/mozilla/components/libnecko.so #8 0x40836600 in NSGetModule () from /usr/lib/mozilla/components/libnecko.so #9 0x407e1256 in NSGetModule () from /usr/lib/mozilla/components/libnecko.so #10 0x407e1160 in NSGetModule () from /usr/lib/mozilla/components/libnecko.so #11 0x4015c86b in nsThreadPoolRunnable::Run () from /usr/lib/libxpcom.so #12 0x4015b32b in nsThread::Main () from /usr/lib/libxpcom.so #13 0x401ea4e4 in _pt_root () from /usr/lib/libnspr4.so #14 0x401fac6f in pthread_start_thread (arg=0x434ffbe0) at manager.c:284
Assignee: pchen → dougt
Status: ASSIGNED → NEW
Target Milestone: Future → ---
Severity: normal → major
Keywords: crash
brendan, alecf, can you review this?
Comment on attachment 64696 [details] [diff] [review] protects against null input. sure sr=alecf
Attachment #64696 - Flags: superreview+
Attachment #64696 - Flags: review+
r=dp
Thanks reviewers. Checking in nsCRT.cpp; /cvsroot/mozilla/xpcom/ds/nsCRT.cpp,v <-- nsCRT.cpp new revision: 3.49; previous revision: 3.48 done
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: