<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>
Eric S. Raymond pushed to branch master
at <a href="https://gitlab.com/NTPsec/ntpsec">NTPsec / ntpsec</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.com/NTPsec/ntpsec/commit/815e48a2daa01fbf272398d21be759476c7137ed">815e48a2</a></strong>
<div>
<span>by Eric S. Raymond</span>
<i>at 2016-01-25T05:10:43-05:00</i>
</div>
<pre class='commit-message'>Coverity cleanup.  Plugs at least one slow memory leak in async DNS.</pre>
</li>
</ul>
<h4>9 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
libntp/ntp_intres.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
libparse/ieee754io.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
ntpd/keyword-gen.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-3'>
ntpd/ntp_config.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-4'>
ntpd/ntp_intercept.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-5'>
ntpd/refclock_jupiter.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-6'>
ntpfrob/pps-api.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-7'>
ntpq/ntpq-subs.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-8'>
tests/ntpdig/utilities.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/815e48a2daa01fbf272398d21be759476c7137ed#diff-0'>
<strong>
libntp/ntp_intres.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/libntp/ntp_intres.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/libntp/ntp_intres.c
</span><span style="color: #aaaaaa">@@ -414,6 +414,8 @@ blocking_getaddrinfo(
</span>           return -1;
        }
 
<span style="color: #000000;background-color: #ddffdd">+        /* FIXME: might be a real resource leak, not a Coverity false positive */
+       /* coverity[leaked_storage] */
</span>   return 0;
 }
 
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/815e48a2daa01fbf272398d21be759476c7137ed#diff-1'>
<strong>
libparse/ieee754io.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/libparse/ieee754io.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/libparse/ieee754io.c
</span><span style="color: #aaaaaa">@@ -349,6 +349,7 @@ fetch_ieee754(
</span>                  */
                      lfpp->l_ui  =  mantissa_high << (32 - frac_offset);
                      lfpp->l_ui |= (mantissa_low >> frac_offset) & ((1 << (32 - frac_offset)) - 1);
<span style="color: #000000;background-color: #ddffdd">+                      /* coverity[large_shift] */
</span>                 lfpp->l_uf  = (mantissa_low & ((1 << frac_offset) - 1)) << (32 - frac_offset);
                    }
                }
<span style="color: #aaaaaa">@@ -490,6 +491,7 @@ put_ieee754(
</span>         mantissa_high  = (outlfp.l_ui << (mbits - msb)) & ((1 << (mbits - 32)) - 1);
              mantissa_high |=  outlfp.l_uf >> (32 - (mbits - msb));
              mantissa_low   = (outlfp.l_ui & ((1 << (msb - mbits)) - 1)) << (32 - (msb - mbits));
<span style="color: #000000;background-color: #ddffdd">+              /* coverity[shift_negative] */
</span>         mantissa_low  |=  outlfp.l_uf >> (msb - mbits);
            }
          else
</code></pre>

<br>
</li>
<li id='diff-2'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/815e48a2daa01fbf272398d21be759476c7137ed#diff-2'>
<strong>
ntpd/keyword-gen.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/keyword-gen.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/keyword-gen.c
</span><span style="color: #aaaaaa">@@ -398,6 +398,7 @@ generate_fsm(void)
</span>           }
 
                if (sst[i].finishes_token) {
<span style="color: #000000;background-color: #ddffdd">+                        /* coverity[leaked_storage] */
</span>                   snprintf(token_id_comment, 
                                 sizeof(token_id_comment), "%5d %-17s",
                                 i, symbname(sst[i].finishes_token));
<span style="color: #aaaaaa">@@ -549,6 +550,7 @@ create_scan_states(
</span>           sst[my_state].followedby = (char)followedby;
 
                if (sst[token].finishes_token != (u_short)token) {
<span style="color: #000000;background-color: #ddffdd">+                        /* coverity[leaked_storage] */
</span>                   fprintf(stderr,
                                "fatal, sst[%d] not reserved for %s.\n",
                                token, symbname(token));
<span style="color: #aaaaaa">@@ -637,6 +639,7 @@ generate_token_text(void)
</span>           }
                if (i > 0)
                        printf(",");
<span style="color: #000000;background-color: #ddffdd">+                /* coverity[leaked_storage] */
</span>           printf("\n\t/* %-5d %5d %20s */\t\"%s\"",
                       id - lowest_id, id, symbname(id), 
                       ntp_keywords[i].key);
</code></pre>

<br>
</li>
<li id='diff-3'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/815e48a2daa01fbf272398d21be759476c7137ed#diff-3'>
<strong>
ntpd/ntp_config.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_config.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_config.c
</span><span style="color: #aaaaaa">@@ -2550,6 +2550,7 @@ config_access(
</span>           if (ai_list != NULL)
                        freeaddrinfo(ai_list);
        }
<span style="color: #000000;background-color: #ddffdd">+        /* coverity[leaked_storage] */
</span> }
 #endif /* !SIM */
 
</code></pre>

<br>
</li>
<li id='diff-4'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/815e48a2daa01fbf272398d21be759476c7137ed#diff-4'>
<strong>
ntpd/ntp_intercept.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_intercept.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_intercept.c
</span><span style="color: #aaaaaa">@@ -191,6 +191,7 @@ void intercept_argparse(int *argc, char ***argv)
</span>       if (was_space)
                *cp = '\0';
        }
<span style="color: #000000;background-color: #ddffdd">+        /* coverity[leaked_storage] */
</span>     }
 }
 
<span style="color: #aaaaaa">@@ -298,6 +299,7 @@ bool intercept_getaddrinfo(char *hname, sockaddr_u *peeraddrp)
</span>       memset(peeraddrp, '\0', sizeof(*peeraddrp));
            octets = min(sizeof(*peeraddrp), res->ai_addrlen);
            memcpy(peeraddrp, res->ai_addr, octets);
<span style="color: #000000;background-color: #ddffdd">+            freeaddrinfo(res);
</span>       return true;
        }
     }
<span style="color: #aaaaaa">@@ -504,8 +506,8 @@ int intercept_adjtime(const struct timeval *ntv, struct timeval *otv)
</span>   /* avoid compiler warnings due to time_t having an unexpected length */
        rntv.tv_sec = nsec;
        rntv.tv_usec = nusec;
<span style="color: #000000;background-color: #ffdddd">-        rntv.tv_sec = osec;
-       rntv.tv_usec = ousec;
</span><span style="color: #000000;background-color: #ddffdd">+   rotv.tv_sec = osec;
+       rotv.tv_usec = ousec;
</span>   if (ntv->tv_sec != rntv.tv_sec
            || ntv->tv_usec != rntv.tv_usec
            || otv->tv_sec != rotv.tv_sec
</code></pre>

<br>
</li>
<li id='diff-5'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/815e48a2daa01fbf272398d21be759476c7137ed#diff-5'>
<strong>
ntpd/refclock_jupiter.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/refclock_jupiter.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/refclock_jupiter.c
</span><span style="color: #aaaaaa">@@ -831,6 +831,7 @@ jupiter_parse_gpos(struct instance *instance, u_short *sp)
</span> 
        instance->gpos_gweek = jg->gweek;
        instance->gpos_sweek = DS2UI(jg->sweek);
<span style="color: #000000;background-color: #ddffdd">+        /* coverity[tainted_data] */
</span>   while(instance->gpos_sweek >= WEEKSECS) {
                instance->gpos_sweek -= WEEKSECS;
                ++instance->gpos_gweek;
</code></pre>

<br>
</li>
<li id='diff-6'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/815e48a2daa01fbf272398d21be759476c7137ed#diff-6'>
<strong>
ntpfrob/pps-api.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpfrob/pps-api.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpfrob/pps-api.c
</span><span style="color: #aaaaaa">@@ -88,7 +88,7 @@ void ppscheck(char *device)
</span>   if (i < 0)
                err(1, "time_pps_getcap");
 
<span style="color: #000000;background-color: #ffdddd">-        pp.mode = PPS_CAPTUREASSERT | PPS_ECHOASSERT;
</span><span style="color: #000000;background-color: #ddffdd">+   /* pp.mode = PPS_CAPTUREASSERT | PPS_ECHOASSERT; */
</span>   pp.mode = PPS_CAPTUREBOTH;
        /* pp.mode = PPS_CAPTUREASSERT; */
 
</code></pre>

<br>
</li>
<li id='diff-7'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/815e48a2daa01fbf272398d21be759476c7137ed#diff-7'>
<strong>
ntpq/ntpq-subs.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpq/ntpq-subs.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpq/ntpq-subs.c
</span><span style="color: #aaaaaa">@@ -1866,6 +1866,7 @@ doprintpeers(
</span>           return true;
        }
        else
<span style="color: #000000;background-color: #ddffdd">+                /* coverity[leaked_storage] */
</span>           return true;
 }
 
</code></pre>

<br>
</li>
<li id='diff-8'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/815e48a2daa01fbf272398d21be759476c7137ed#diff-8'>
<strong>
tests/ntpdig/utilities.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/tests/ntpdig/utilities.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/tests/ntpdig/utilities.c
</span><span style="color: #aaaaaa">@@ -54,10 +54,16 @@ void FinishDebugTest(const char *expected,
</span>   fp_a = fopen(actual, "rb");
        fp_e = fopen(expected, "rb");
 
<span style="color: #000000;background-color: #ffdddd">-        CompareFileContent(fp_e, fp_a);
-
-       fclose(fp_a);
-       fclose(fp_e);
</span><span style="color: #000000;background-color: #ddffdd">+   if (fp_a != NULL && fp_e != NULL)
+           CompareFileContent(fp_e, fp_a);
+       else
+           fprintf(stderr,
+                   "FinishDebugTest: file pointer unexpectedly null.\n");
+
+       if (fp_a)
+           fclose(fp_a);
+       if (fp_e)
+           fclose(fp_e);
</span> 
        free((void*) expected);
        free((void*) actual);
</code></pre>

<br>
</li>

</div>
<div class='footer' style='margin-top: 10px;'>
<p>

<br>
<a href="https://gitlab.com/NTPsec/ntpsec/commit/815e48a2daa01fbf272398d21be759476c7137ed">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.com/NTPsec/ntpsec/commit/815e48a2daa01fbf272398d21be759476c7137ed"}}</script>
</p>
</div>
</body>
</html>