summaryrefslogtreecommitdiff
path: root/regex
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>1999-09-15 05:42:36 +0000
committerAndi Gutmans <andi@php.net>1999-09-15 05:42:36 +0000
commit100148168ab400ec7d0ccc16f2d72c06b6170570 (patch)
tree1e4a971cbab6358bc3e5ac412a79fe7131f66623 /regex
parent0a7fc832531a9fedc832f4db4b8b04552daabbcb (diff)
downloadphp-git-100148168ab400ec7d0ccc16f2d72c06b6170570.tar.gz
- Thread-unsafe win32 compiles again
- Some strlcpy changes including one bug fix.
Diffstat (limited to 'regex')
-rw-r--r--regex/regerror.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/regex/regerror.c b/regex/regerror.c
index 12edd4e164..319f116896 100644
--- a/regex/regerror.c
+++ b/regex/regerror.c
@@ -94,8 +94,7 @@ size_t errbuf_size;
if (errbuf_size > len)
(void) strcpy(errbuf, s);
else {
- (void) strncpy(errbuf, s, errbuf_size-1);
- errbuf[errbuf_size-1] = '\0';
+ (void) strlcpy(errbuf, s, errbuf_size);
}
}