git.samba.org
/
nivanova
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a79b205
)
backport from head
author
Simo Sorce
<idra@samba.org>
Fri, 19 Mar 2004 11:28:36 +0000
(11:28 +0000)
committer
Simo Sorce
<idra@samba.org>
Fri, 19 Mar 2004 11:28:36 +0000
(11:28 +0000)
(This used to be commit
e05eb1437054286f14714c46099e867a396dac7d
)
source3/lib/replace.c
patch
|
blob
|
history
diff --git
a/source3/lib/replace.c
b/source3/lib/replace.c
index cd48b8d160fe4f7f249694492c62afb886351c1f..fe1cfc04eb11c2edd4487782277de60b117fd15a 100644
(file)
--- 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);
}