projects
/
sxemacs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd67478
)
Coverity fixes.
author
Nelson Ferreira
<nelson.ferreira@ieee.org>
Sun, 2 Oct 2011 19:14:01 +0000
(15:14 -0400)
committer
Nelson Ferreira
<nelson.ferreira@ieee.org>
Sun, 2 Oct 2011 19:14:01 +0000
(15:14 -0400)
* src/ui/Gtk/event-gtk.c (gtk_keysym_to_emacs_keysym): use snprintf instead of sprintf.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
src/ui/Gtk/event-gtk.c
patch
|
blob
|
history
diff --git
a/src/ui/Gtk/event-gtk.c
b/src/ui/Gtk/event-gtk.c
index
e2d887e
..
8c3057a
100644
(file)
--- a/
src/ui/Gtk/event-gtk.c
+++ b/
src/ui/Gtk/event-gtk.c
@@
-411,8
+411,10
@@
static Lisp_Object gtk_keysym_to_emacs_keysym(guint keysym, int simple_p)
default:
{
char buf[64];
- sprintf(buf, "unknown-keysym-0x%X",
- (int)keysym);
+ int sz = snprintf(buf, sizeof(buf),
+ "unknown-keysym-0x%X",
+ (int)keysym);
+ assert(sz >= 0 && sz < sizeof(buf));
return KEYSYM(buf);
}
}