diff options
author | Jeremy Allison <jra@samba.org> | 2008-07-02 11:57:13 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-07-02 11:57:13 -0700 |
commit | d7c82997bdcf1acd7ac104efa0ad05e0b94935ea (patch) | |
tree | 441d34cbc94d401280d0b244805c41dac8a08ccb /source/client | |
parent | ade27d8baa03816b6f5f480096dfb90f3e231e6a (diff) | |
download | samba-d7c82997bdcf1acd7ac104efa0ad05e0b94935ea.tar.gz samba-d7c82997bdcf1acd7ac104efa0ad05e0b94935ea.tar.xz samba-d7c82997bdcf1acd7ac104efa0ad05e0b94935ea.zip |
Fix bug #5578, reported by sendel2000@hotbox.ru. Bad (non-Samba) use of strlcat gives error.
Jeremy.
Diffstat (limited to 'source/client')
-rw-r--r-- | source/client/mount.cifs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c index ea254b6047c..72ef9febe0a 100644 --- a/source/client/mount.cifs.c +++ b/source/client/mount.cifs.c @@ -115,6 +115,9 @@ size_t strlcat(char *d, const char *s, size_t bufsize) size_t ret = len1 + len2; if (len1+len2 >= bufsize) { + if (bufsize < (len1+1)) { + return ret; + } len2 = bufsize - (len1+1); } if (len2 > 0) { |