<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
img {
max-width: 100%;
height: auto;
}
p.details {
font-style:italic;
color:#777
}
.footer p {
font-size:small;
color:#777
}
pre.commit-message {
white-space: pre-wrap;
}
.file-stats a {
text-decoration: none;
}
.file-stats .new-file {
color: #090;
}
.file-stats .deleted-file {
color: #B00;
}
</style>
<body>
<div class='content'>
<h3>Dom Rushbrook pushed to branch master at <a href="https://projects.sucs.org/arthur/mw">Justin Mitchell / mw</a></h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://projects.sucs.org/arthur/mw/commit/08e6e5e025487300a65b2560da789fe4a58bfd0a">08e6e5e0</a></strong>
<div>
<span>by Dom Rushbrook</span>
<i>at 2015-10-29T10:34:52Z</i>
</div>
<pre class='commit-message'>Fixes a segv and other wrong behaviours from changing to use AUTOFREE_BUFFERs</pre>
</li>
<li>
<strong><a href="https://projects.sucs.org/arthur/mw/commit/b756151260266a14a023876ea40b0e51f24a71f2">b7561512</a></strong>
<div>
<span>by Dom Rushbrook</span>
<i>at 2015-10-29T10:40:31Z</i>
</div>
<pre class='commit-message'>Merge branch 'master' of projects.sucs.org:arthur/mw</pre>
</li>
</ul>
<h4>1 changed file:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
src/client/script_inst.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://projects.sucs.org/arthur/mw/compare/f4da16559917ccb5aa04be66edbd4521fb8ffbd6...b756151260266a14a023876ea40b0e51f24a71f2#diff-0'>
<strong>
src/client/script_inst.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/src/client/script_inst.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/src/client/script_inst.c
</span><span style="color: #aaaaaa">@@ -174,7 +174,7 @@ void scr_time( struct code *pc, int fargc, char **fargv )
</span> }
/* set default idle time to zero */
- snprintf(value, MAXTEXTLENGTH - 1, "0");
<span style="color: #000000;background-color: #ddffdd">+ string_add(&value, "0");
</span>
size_t wi;
json_t *entry;
<span style="color: #aaaaaa">@@ -184,7 +184,7 @@ void scr_time( struct code *pc, int fargc, char **fargv )
</span>
if (!strcasecmp(name, uname))
{
- snprintf(value, MAXTEXTLENGTH - 1, "%ld", now - idletime);
<span style="color: #000000;background-color: #ddffdd">+ string_add(&value, "%ld", now - idletime);
</span> if (script_debug) printf("- %s: Idletime is %ld\n", pc->inst->name, now - idletime);
}
}
<span style="color: #aaaaaa">@@ -193,9 +193,10 @@ void scr_time( struct code *pc, int fargc, char **fargv )
</span> else if (!strcasecmp(pc->inst->name, "whenami"))
{
struct tm *tt;
-
<span style="color: #000000;background-color: #ddffdd">+
</span> tt=localtime(&now);
- strftime(value, MAXTEXTLENGTH-1, "%H:%M", tt);
<span style="color: #000000;background-color: #ddffdd">+ value=malloc(10);
+ strftime(value, 9, "%H:%M", tt);
</span> }
else if (!strcasecmp(pc->inst->name, "date"))
{
<span style="color: #aaaaaa">@@ -963,16 +964,16 @@ void scr_split( struct code *pc, int fargc, char **fargv )
</span> char *bbp;
if ((bbp = strchr(ccp, ' ')) == NULL)
{
- VAR_STR_UPDATE(&var1, cc);
<span style="color: #000000;background-color: #ddffdd">+ VAR_STR_UPDATE(&var1, ccp);
</span> VAR_STR_UPDATE(&var2, "");
}
else
{
- bbp = bb;
- bbp++;
- VAR_STR_UPDATE(&var2, bbp);
- *bb=0;
- VAR_STR_UPDATE(&var1, cc);
<span style="color: #000000;background-color: #ddffdd">+ char *dd = bbp;
+ dd++;
+ VAR_STR_UPDATE(&var2, dd);
+ *bbp=0;
+ VAR_STR_UPDATE(&var1, ccp);
</span> }
}
</code></pre>
<br>
</li>
</div>
<div class='footer' style='margin-top: 10px;'>
<p>
—
<br>
<a href="https://projects.sucs.org/arthur/mw/compare/f4da16559917ccb5aa04be66edbd4521fb8ffbd6...b756151260266a14a023876ea40b0e51f24a71f2">View it on GitLab</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":["merge_requests","issues","commit"],"url":"https://projects.sucs.org/arthur/mw/compare/f4da16559917ccb5aa04be66edbd4521fb8ffbd6...b756151260266a14a023876ea40b0e51f24a71f2"}}</script>
</p>
</div>
</body>
</html>