diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-10-04 20:51:17 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:09 -0500 |
commit | 8f553d8d3cbdf372ddbcbdaab48ef16296d3872c (patch) | |
tree | bbe2063fffd3345430b6637ac85c7eed7639d2fe /source3/locking | |
parent | f27d5c7838eb0183baaedb3deb33cdfe7327c917 (diff) | |
download | samba-8f553d8d3cbdf372ddbcbdaab48ef16296d3872c.tar.gz samba-8f553d8d3cbdf372ddbcbdaab48ef16296d3872c.tar.bz2 samba-8f553d8d3cbdf372ddbcbdaab48ef16296d3872c.zip |
r19078: talloc_strdup can fail
(This used to be commit 2b3b9ce2a122ec5fd945728c117c321087d85203)
Diffstat (limited to 'source3/locking')
-rw-r--r-- | source3/locking/locking.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c index 371f1b474c..fbe22f4e1d 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -562,12 +562,18 @@ static BOOL parse_share_modes(TDB_DATA dbuf, struct share_mode_lock *lck) (lck->num_share_modes * sizeof(struct share_mode_entry)) + data->u.s.delete_token_size ); + if (lck->servicepath == NULL) { + smb_panic("talloc_strdup failed\n"); + } lck->filename = talloc_strdup(lck, dbuf.dptr + sizeof(*data) + (lck->num_share_modes * sizeof(struct share_mode_entry)) + data->u.s.delete_token_size + strlen(lck->servicepath) + 1 ); + if (lck->filename == NULL) { + smb_panic("talloc_strdup failed\n"); + } /* * Ensure that each entry has a real process attached. |