diff options
author | Simo Sorce <idra@samba.org> | 2004-03-19 11:28:36 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2004-03-19 11:28:36 +0000 |
commit | ebf27cf5a12711ea12058876e609864ad642b53a (patch) | |
tree | 1138e8e03c7c9485aff62442d3bf22a176493913 /source3/lib | |
parent | a79b205d9202a61ef5c82f7fccd1513df0290585 (diff) | |
download | samba-ebf27cf5a12711ea12058876e609864ad642b53a.tar.gz samba-ebf27cf5a12711ea12058876e609864ad642b53a.tar.bz2 samba-ebf27cf5a12711ea12058876e609864ad642b53a.zip |
backport from head
(This used to be commit e05eb1437054286f14714c46099e867a396dac7d)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/replace.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/lib/replace.c b/source3/lib/replace.c index cd48b8d160..fe1cfc04eb 100644 --- a/source3/lib/replace.c +++ b/source3/lib/replace.c @@ -65,6 +65,9 @@ ftruncate for operating systems that don't have it size_t len2 = strlen(s); size_t ret = len1 + len2; + if (len1 >= bufsize) { + return 0; + } if (len1+len2 >= bufsize) { len2 = bufsize - (len1+1); } |