Revision: 2684
http://tmux.svn.sourceforge.net/tmux/?rev=2684&view=rev
Author: tcunha
Date: 2012-01-29 12:52:16 +0000 (Sun, 29 Jan 2012)
Log Message:
-----------
Sync OpenBSD patchset 1013:
Terminate strftime buffer properly even if a really long format string
is given, from Tiago Cunha.
Modified Paths:
--------------
trunk/status.c
Modified: trunk/status.c
===================================================================
--- trunk/status.c 2012-01-29 12:51:43 UTC (rev 2683)
+++ trunk/status.c 2012-01-29 12:52:16 UTC (rev 2684)
@@ -491,9 +491,10 @@
{
static char out[BUFSIZ];
char in[BUFSIZ], ch, *iptr, *optr;
+ size_t len;
- strftime(in, sizeof in, fmt, localtime(&t));
- in[(sizeof in) - 1] = '\0';
+ len = strftime(in, sizeof in, fmt, localtime(&t));
+ in[len] = '\0';
iptr = in;
optr = out;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs