summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_prs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index 8311528874..6bab18ba9d 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -36,9 +36,9 @@ void prs_dump(char *name, int v, prs_struct *ps)
if (DEBUGLEVEL < 50) return;
for (i=1;i<100;i++) {
if (v != -1) {
- slprintf(fname,sizeof(fname), "/tmp/%s_%d.%d.prs", name, v, i);
+ slprintf(fname,sizeof(fname)-1, "/tmp/%s_%d.%d.prs", name, v, i);
} else {
- slprintf(fname,sizeof(fname), "/tmp/%s.%d.prs", name, i);
+ slprintf(fname,sizeof(fname)-1, "/tmp/%s.%d.prs", name, i);
}
fd = open(fname, O_WRONLY|O_CREAT|O_EXCL, 0644);
if (fd != -1 || errno != EEXIST) break;