Closed
Bug 126462
Opened 23 years ago
Closed 13 years ago
Occurences of uninitialized variables being used before being set (in directory/c-sdk).
Categories
(Directory :: LDAP C SDK, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
5.12
People
(Reporter: mozilla-bugs, Assigned: mcs)
References
Details
(Whiteboard: needs commit to ldapcsdk_50_client_branch)
Attachments
(2 files, 2 obsolete files)
20.78 KB,
patch
|
dmosedale
:
superreview+
|
Details | Diff | Splinter Review |
1.52 KB,
patch
|
dmosedale
:
superreview+
|
Details | Diff | Splinter Review |
This bug is just for the warnings in various source files in directory/c-sdk/ldap/libraries/libldap. Currently (http://tinderbox.mozilla.org/SeaMonkey/warn1014136200.29882.html - Tue, 19 Feb 2002 11:30 EST) TBox shows the following warnings: directory/c-sdk/ldap/libraries/libldap/error.c:329 `errcode' might be used uninitialized in this function directory/c-sdk/ldap/libraries/libldap/utf8.c:111 `c' might be used uninitialized in this function (Note - because of TBox bug 124614 TBox actually shows these warnings as happening to error.c and utf8.c in NSS, but examiming the build log reveals that they actually happen in libldap)
Reporter | ||
Comment 1•23 years ago
|
||
Bug 59652 is the meta-bug tracking the fight against these (potentially very nasty) warnings. P.S. Trying to make sure that 1.0 has as little warnings as possible.
Blocks: 59652
Assignee | ||
Comment 2•23 years ago
|
||
The ldap_utf8getcc() code (in utf8.c) includes a switch statement without a default case. The variable c is assigned in every case within the switch, and the value switched on is guaranteed to match one of the cases. We could just initialize the variable c to zero to make the warning go away. But there is not a bug there. The ldap_parse_result() code (in error.c) does have a bug. The function returns a "failure" result code in one case, but sets another int * pointer that was passed in to a potentially uninitialized value. As long as all callers check the function's main return code, nothing bad will happen. But we should avoid using errcode if it has not been set (specifically, if parsing the LDAP result message fails for some reason). Dan, how close are you to switching to the ldapcsdk_branch_50 code? Should I fix these warnings on LDAPCSDK_40_BRANCH or wait?
Reporter | ||
Comment 3•22 years ago
|
||
Current (http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1017613860.20014.gz&fulltext=1 , Sun, 31 Mar 2002 17:31 EST) list of warnings in there: directory/c-sdk/ldap/libraries/liblber/io.c:656 `newlen' might be used uninitialized in this function `tag' might be used uninitialized in this function directory/c-sdk/ldap/libraries/libldap/error.c:345 `errcode' might be used uninitialized in this function directory/c-sdk/ldap/libraries/libldap/os-ip.c:538 `rc' might be used uninitialized in this function `s' might be used uninitialized in this function directory/c-sdk/ldap/libraries/libldap/os-ip.c:542 `ldhpbuf_allocd' might be used uninitialized in this function directory/c-sdk/ldap/libraries/libldap/request.c:356 `rc' might be used uninitialized in this function directory/c-sdk/ldap/libraries/libldap/request.c:889 `rc' might be used uninitialized in this function directory/c-sdk/ldap/libraries/libldap/result.c:270 `lr' might be used uninitialized in this function directory/c-sdk/ldap/libraries/libldap/search.c:789 `firstdigit' might be used uninitialized in this function directory/c-sdk/ldap/libraries/libldap/utf8.c:112 `c' might be used uninitialized in this function
Assignee | ||
Updated•22 years ago
|
Priority: -- → P1
Assignee | ||
Updated•22 years ago
|
Whiteboard: needs work
Assignee | ||
Updated•22 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → 5.11
Assignee | ||
Comment 4•22 years ago
|
||
Mass move of several bugs to TM 5.12.
Target Milestone: 5.11 → 5.12
Updated•22 years ago
|
Summary: Occurances of uninitialized variables being used before being set (in directory/c-sdk). → Occurences of uninitialized variables being used before being set (in directory/c-sdk).
Assignee | ||
Updated•21 years ago
|
Whiteboard: needs work
Assignee | ||
Comment 5•21 years ago
|
||
Assignee | ||
Comment 6•21 years ago
|
||
Attachment #118108 -
Attachment is obsolete: true
Comment 7•21 years ago
|
||
OK.
Assignee | ||
Comment 8•21 years ago
|
||
Comment on attachment 118294 [details] [diff] [review] proposed fix: eliminate warnings Seeking sr approval for commit to ldapcsdk_50_client_branch
Attachment #118294 -
Flags: superreview?(dmose)
Assignee | ||
Comment 9•21 years ago
|
||
Fix committed to the trunk: mozilla/directory/c-sdk/ldap/clients/tools/ldapdelete.c new revision: 5.3; previous revision: 5.2 mozilla/directory/c-sdk/ldap/clients/tools/ldapmodify.c new revision: 5.3; previous revision: 5.2 mozilla/directory/c-sdk/ldap/clients/tools/ldapsearch.c new revision: 5.6; previous revision: 5.5 mozilla/directory/c-sdk/ldap/libraries/liblber/io.c new revision: 5.1; previous revision: 5.0 mozilla/directory/c-sdk/ldap/libraries/libldap/cache.c new revision: 5.1; previous revision: 5.0 mozilla/directory/c-sdk/ldap/libraries/libldap/error.c new revision: 5.1; previous revision: 5.0 mozilla/directory/c-sdk/ldap/libraries/libldap/os-ip.c new revision: 5.6; previous revision: 5.5 mozilla/directory/c-sdk/ldap/libraries/libldap/request.c new revision: 5.2; previous revision: 5.1 mozilla/directory/c-sdk/ldap/libraries/libldap/result.c new revision: 5.1; previous revision: 5.0 mozilla/directory/c-sdk/ldap/libraries/libldap/search.c new revision: 5.1; previous revision: 5.0 mozilla/directory/c-sdk/ldap/libraries/libldap/utf8.c new revision: 5.1; previous revision: 5.0 mozilla/directory/c-sdk/ldap/libraries/libssldap/clientinit.c new revision: 5.4; previous revision: 5.3 mozilla/directory/c-sdk/ldap/libraries/libssldap/ldapsinit.c new revision: 5.7; previous revision: 5.6 Fix 126462 - Occurences of uninitialized variables being used before being set (in directory/c-sdk).
Assignee | ||
Comment 10•21 years ago
|
||
Assignee | ||
Comment 11•21 years ago
|
||
Added a rule to build etest, which is handy for testing.
Assignee | ||
Updated•21 years ago
|
Attachment #118322 -
Attachment is obsolete: true
Assignee | ||
Comment 12•21 years ago
|
||
Additional fix committed to the trunk: mozilla/directory/c-sdk/ldap/libraries/liblber/Makefile.client new revision: 5.1; previous revision: 5.0 mozilla/directory/c-sdk/ldap/libraries/liblber/io.c new revision: 5.2; previous revision: 5.1 Follow up fix for 126462 - Occurences of uninitialized variables being used before being set (in directory/c-sdk). Fix debug build.
Assignee | ||
Updated•21 years ago
|
Attachment #118325 -
Flags: superreview?(dmose)
Comment 13•21 years ago
|
||
Comment on attachment 118325 [details] [diff] [review] revised additional fix: debug build and rule for etest target sr=dmose
Attachment #118325 -
Flags: superreview?(dmose) → superreview+
Comment 14•21 years ago
|
||
Comment on attachment 118294 [details] [diff] [review] proposed fix: eliminate warnings sr=dmose@mozilla.org
Attachment #118294 -
Flags: superreview?(dmose) → superreview+
Assignee | ||
Updated•21 years ago
|
Whiteboard: needs commit to ldapcsdk_50_client_branch
Comment 16•19 years ago
|
||
It looks as though this bug has been fixed. What do we need to do to resolve it?
Assignee | ||
Comment 17•19 years ago
|
||
I am not sure if the fix has been committed to the client branch (ldapcsdk_50_client_branch). I suspect not.
Comment 18•13 years ago
|
||
I don't think we still have libldap in mozilla source code (could not find in m-c repository). Closing this issue. If one finds this issue is still valid please reopen it.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Comment 19•13 years ago
|
||
(In reply to Atul Aggarwal from comment #18) > I don't think we still have libldap in mozilla source code (could not find > in m-c repository). If it wasn't we'd have closed the product/component, however the LDAP c-sdk lives on here: http://hg.mozilla.org/projects/ldap-sdks/ and Thunderbird and SeaMonkey still use it. That said based on comment 16-17, I think this can be marked fixed (we no longer use the 50 client branch).
Resolution: WORKSFORME → FIXED
Comment 20•13 years ago
|
||
Mark, I have limited knowledge of mozilla sources. Please feel free to open an issue which I might have closed due to my limited knowledge. Thanks for clarifying about ldap.
You need to log in
before you can comment on or make changes to this bug.
Description
•