Revision: 2781 http://tmux.svn.sourceforge.net/tmux/?rev=2781&view=rev Author: tcunha Date: 2012-04-24 16:22:28 +0000 (Tue, 24 Apr 2012) Log Message: ----------- Sync OpenBSD patchset 1099:
Do not return a buffer on the stack, mentioned by jsg a while ago. Modified Paths: -------------- trunk/cmd.c Modified: trunk/cmd.c =================================================================== --- trunk/cmd.c 2012-04-24 16:21:43 UTC (rev 2780) +++ trunk/cmd.c 2012-04-24 16:22:28 UTC (rev 2781) @@ -1324,8 +1324,10 @@ return (s->cwd); complete_path: - if (root[skip] == '\0') - return (root); + if (root[skip] == '\0') { + strlcpy(path, root, sizeof path); + return (path); + } n = snprintf(path, sizeof path, "%s/%s", root, cwd + skip); if (n > 0 && (size_t)n < sizeof path) return (path); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ tmux-cvs mailing list tmux-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-cvs