Issue 2819 - setup crashes when LOGNAME is unset
Summary: setup crashes when LOGNAME is unset
Status: CLOSED FIXED
Alias: None
Product: Installation
Classification: Application
Component: code (show other issues)
Version: 641
Hardware: PC NetBSD
: P2 Trivial (vote)
Target Milestone: ---
Assignee: dirk.voelzke
QA Contact: issues@installation
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-12 17:50 UTC by mrauch-openoffice
Modified: 2003-09-08 16:53 UTC (History)
1 user (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
fix for crash (638 bytes, patch)
2002-01-12 17:50 UTC, mrauch-openoffice
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description mrauch-openoffice 2002-01-12 17:50:05 UTC
If you start setup in a shell where the environment variable LOGNAME is unset,
OOo will crash after the License screen. This is due to a bug in setup2 as the
variable LOGNAME is directly taken from getenv (which returns a NULL pointer
when the environment variable is unset) and passed as argument to
UniString::CreateFromAscii which expects its argument to be non-NULL. 
This bug was observed on NetBSD, but the relevant code is protected by #ifdef
UNX, so should affect all Unix versions of OOo.

The attached patch fixes the problem by passing an empty string when getenv
returns NULL, but IMHO it should be considered to change
UniString::CreateFromAscii to accept NULL-pointers.
Comment 1 mrauch-openoffice 2002-01-12 17:50:50 UTC
Created attachment 935 [details]
fix for crash
Comment 2 Olaf Felka 2002-01-14 09:27:56 UTC
Hi Olli,
is this usefull for us?
Comment 3 dirk.voelzke 2002-01-23 09:24:16 UTC
I'll fix this
Comment 4 dirk.voelzke 2002-02-14 09:02:20 UTC
fixed in paddr.cxx ver 1.6 (OO642?)
Comment 5 mrauch-openoffice 2002-04-15 17:46:14 UTC
This fix should also be applied to the OOO_STABLE_1 branch. 
=> Reopened and keyword ooo1.0 set.

Thank you
Comment 6 Martin Hollmichel 2002-04-18 09:08:12 UTC
it's now in the branch.
Comment 7 dirk.voelzke 2002-05-15 14:15:52 UTC
Looks like the bugfix is ok.