Revision: 2713
http://tmux.svn.sourceforge.net/tmux/?rev=2713&view=rev
Author: tcunha
Date: 2012-03-07 13:36:57 +0000 (Wed, 07 Mar 2012)
Log Message:
-----------
Sync OpenBSD patchset 1038:
Terminate strftime buffer properly and free format string, whoops. From
Tiago Cunha.
Modified Paths:
--------------
trunk/cmd-display-message.c
Modified: trunk/cmd-display-message.c
===================================================================
--- trunk/cmd-display-message.c 2012-03-07 13:36:19 UTC (rev 2712)
+++ trunk/cmd-display-message.c 2012-03-07 13:36:57 UTC (rev 2713)
@@ -51,6 +51,7 @@
struct format_tree *ft;
char out[BUFSIZ];
time_t t;
+ size_t len;
if ((c = cmd_find_client(ctx, args_get(args, 'c'))) == NULL)
return (-1);
@@ -83,14 +84,16 @@
format_window_pane(ft, wp);
t = time(NULL);
- strftime(out, sizeof out, template, localtime(&t));
+ len = strftime(out, sizeof out, template, localtime(&t));
+ out[len] = '\0';
msg = format_expand(ft, out);
if (args_has(self->args, 'p'))
ctx->print(ctx, "%s", msg);
else
status_message_set(c, "%s", msg);
+
xfree(msg);
-
+ format_free(ft);
return (0);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs