changeset 3195:2583e821e800

Updated #285: Replaced sprintf() with snprintf()
author unexist
date Thu, 22 Mar 2012 16:02:44 +0100
parents 638dc905e030
children 60af832fd27d
files src/subtle/event.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/subtle/event.c	Thu Mar 22 16:02:19 2012 +0100
+++ b/src/subtle/event.c	Thu Mar 22 16:02:44 2012 +0100
@@ -545,8 +545,10 @@
                 subtle->panels.keychain.keychain->keys, (len +
                 subtle->panels.keychain.keychain->len + 1) * sizeof(char));
 
-              sprintf(subtle->panels.keychain.keychain->keys +
-                subtle->panels.keychain.keychain->len, "%s%s", buf, key);
+              snprintf(subtle->panels.keychain.keychain->keys +
+                subtle->panels.keychain.keychain->len,
+                subtle->panels.keychain.keychain->len + len,
+                "%s%s", buf, key);
 
               subtle->panels.keychain.keychain->len += len;