projects
/
sxemacs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d00503
)
Fix potential stack/string overflow warning
author
Nelson Ferreira
<nelson.ferreira@ieee.org>
Wed, 14 Sep 2011 08:36:00 +0000
(
04:36
-0400)
committer
Nelson Ferreira
<nelson.ferreira@ieee.org>
Wed, 14 Sep 2011 08:36:00 +0000
(
04:36
-0400)
CID:379
src/symbols.c
patch
|
blob
|
history
diff --git
a/src/symbols.c
b/src/symbols.c
index
a2441a8
..
d5c1740
100644
(file)
--- a/
src/symbols.c
+++ b/
src/symbols.c
@@
-3749,7
+3749,8
@@
defsymbol_massage_name_1(Lisp_Object * location, const char *name, int dump_p,
assert(len + 1 < sizeof(temp));
else
assert(len < sizeof(temp));
- strcpy(temp, name + 1); /* Remove initial Q */
+ temp[0]='\0';
+ strncat(temp, name + 1, sizeof(temp)-1); /* Remove initial Q */
if (multiword_predicate_p) {
/* Overwrite the 'p' which is the last char of name
and put "_p" instead. */