Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 227503 - valgrind warning in libsmbclient
Summary: valgrind warning in libsmbclient
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: samba
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Simo Sorce
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-02-06 14:40 UTC by Alexander Larsson
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-09-12 14:54:26 UTC


Attachments (Terms of Use)

Description Alexander Larsson 2007-02-06 14:40:58 UTC
I get an uninitialized memory warning in:
samba-3.0.23c/source/libsmb/libsmbclient.c
when reading from smb:///.

The problem is this code:
		strncpy(server, context->workgroup, 
			((strlen(context->workgroup) < 16)
                         ? strlen(context->workgroup)
                         : 16));
                server[server_len - 1] = '\0';

Limiting the strncpy to strlen(source) means the terminating zero won't be copied.

Comment 1 Simo Sorce 2007-02-08 15:20:15 UTC
Fixed upstream in rev 21239


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