Author: iratqq
Date: Sun Apr 27 04:10:17 2008
New Revision: 5453

Modified:
  trunk/uim/uim-custom.c

Log:
* uim/uim-custom.c (c_list_to_str):
 - Use strlcat. Terminating is not needed.


Modified: trunk/uim/uim-custom.c
==============================================================================
--- trunk/uim/uim-custom.c      (original)
+++ trunk/uim/uim-custom.c      Sun Apr 27 04:10:17 2008
@@ -408,15 +408,14 @@

  for (bufp = buf, elem = list; *elem; elem++) {
    if (elem != list) {
-      strcpy(bufp, sep);
+      strlcat(buf, sep, buf_size);
      bufp += strlen(sep);
    }
    str = (*mapper)(*elem);
-    strcpy(bufp, str);
+    strlcat(buf, str, buf_size);
    bufp += strlen(str);
    free(str);
  }
-  buf[buf_size - 1] = '\0';

  return buf;
}

Reply via email to