projects
/
sxemacs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f084bb6
)
Coverity: CID 400831: Out of bonds access
author
Nelson Ferreira
<nelson.ferreira@ieee.org>
Wed, 7 Mar 2012 14:32:01 +0000
(09:32 -0500)
committer
Nelson Ferreira
<nelson.ferreira@ieee.org>
Wed, 7 Mar 2012 14:32:01 +0000
(09:32 -0500)
* src/fileio.c: Provide proper length to xstrncat
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
src/fileio.c
patch
|
blob
|
history
diff --git
a/src/fileio.c
b/src/fileio.c
index
bae112a
..
4145646
100644
(file)
--- a/
src/fileio.c
+++ b/
src/fileio.c
@@
-1034,7
+1034,7
@@
See also the function `substitute-in-file-name'.
file_name_as_directory((char *)target, (char *)newdir, tlen);
}
- xstrncat((char *)target, (char *)nm, tlen);
+ xstrncat((char *)target, (char *)nm, tlen
-1
);
/* ASSERT (IS_DIRECTORY_SEP (target[0])) if not VMS */