Bug 3166 - getenv(HOME) null pointer dereference
Summary: getenv(HOME) null pointer dereference
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 3.0.20b
Hardware: All All
: P3 normal
Target Milestone: none
Assignee: Derrell Lipman
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-13 08:31 UTC by Derrell Lipman
Modified: 2005-10-13 11:08 UTC (History)
0 users

See Also:


Attachments
Patch I've applied to 3.0 (2.18 KB, patch)
2005-10-13 11:08 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Derrell Lipman 2005-10-13 08:31:14 UTC
smbc_init_context() issues

  home = getenv("HOME")
  slprintf(conf, sizeof(conf), "%s/.smb/smb.conf", home)

but if HOME is not set in the environment, 'home' is null.

Fix to assume that if HOME is not set, then ${HOME}/.smb/smb.conf and
${HOME}/.smb/smb.conf.append do not exist.
Comment 1 Jeremy Allison 2005-10-13 11:08:14 UTC
Created attachment 1507 [details]
Patch I've applied to 3.0
Comment 2 Jeremy Allison 2005-10-13 11:08:28 UTC
Fixed in SVN. Thanks.
Jeremy.