<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>
GitLab
</title>



</head>
<body>
<style type="text/css">
img {
max-width: 100%; height: auto;
}
</style>
<div class="content">
<h3>
Gary E. Miller 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/3d0423deec390de47e514aad1327384e7bcef5d1">3d0423de</a></strong>
<div>
<span>by Gary E. Miller</span>
<i>at 2017-04-12T11:59:11-07:00</i>
</div>
<pre class="commit-message" style="margin: 0; white-space: pre-wrap">decodenetnum(): don't return random data on fail.
</pre>
</li>
</ul>
<h4>1 changed file:</h4>
<ul>
<li class="file-stats">
<a href="#fcddd7c410d3dafd1019b2d901886db667cc7c47">
libntp/decodenetnum.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id="fcddd7c410d3dafd1019b2d901886db667cc7c47">
<a href="https://gitlab.com/NTPsec/ntpsec/commit/3d0423deec390de47e514aad1327384e7bcef5d1#fcddd7c410d3dafd1019b2d901886db667cc7c47"><strong>libntp/decodenetnum.c</strong></a>
<hr>
<table class="code white" style="-premailer-cellpadding: 0; -premailer-cellspacing: 0; -premailer-width: 100%; background: #fff; font-family: monospace; font-size: 12px" bgcolor="#fff" width="100%" cellpadding="0" cellspacing="0">
<tr class="line_holder match" id="" style="line-height: 1.6">
<td class="diff-line-num unfold js-unfold old_line" data-linenumber="40" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">...</td>
<td class="diff-line-num unfold js-unfold new_line" data-linenumber="40" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">...</td>
<td class="line_content match " style="background: #fafafa; color: rgba(0,0,0,0.3); padding-left: 0.5em; padding-right: 0.5em" bgcolor="#fafafa">@@ -40,6 +40,7 @@ decodenetnum(</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6">
<td class="diff-line-num old_line" data-linenumber="40" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
40
</td>
<td class="diff-line-num new_line" data-linenumber="40" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
40
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC40" class="line" lang="c"></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6">
<td class="diff-line-num old_line" data-linenumber="41" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
41
</td>
<td class="diff-line-num new_line" data-linenumber="41" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
41
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC41" class="line" lang="c">      <span class="kt" style="color: #458; font-weight: bold">char</span> <span class="n" style="color: #333">ip</span><span class="p">[</span><span class="n" style="color: #333">INET6_ADDRSTRLEN</span><span class="p">];</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6">
<td class="diff-line-num old_line" data-linenumber="42" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
42
</td>
<td class="diff-line-num new_line" data-linenumber="42" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
42
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC42" class="line" lang="c"></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="" style="line-height: 1.6">
<td class="diff-line-num new old_line" data-linenumber="43" style="background: #cdedda; border-right-color: #bae6cc; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#cdedda">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="43" style="background: #cdedda; border-right-color: #bae6cc; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#cdedda">
43
</td>
<td class="line_content new noteable_line" style="background: #e4f5eb; padding-left: 0.5em; padding-right: 0.5em" bgcolor="#e4f5eb">
<pre style="margin: 0">+<span id="LC43" class="line" lang="c">      <span class="n" style="color: #333">ZERO</span><span class="p">(</span><span class="o" style="font-weight: bold">*</span><span class="n" style="color: #333">netnum</span><span class="p">);</span>               <span class="cm" style="color: #998; font-style: italic">/* don't return random data on fail */</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6">
<td class="diff-line-num old_line" data-linenumber="43" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
43
</td>
<td class="diff-line-num new_line" data-linenumber="44" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
44
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC44" class="line" lang="c">      <span class="n" style="color: #333">NTP_REQUIRE</span><span class="p">(</span><span class="n" style="color: #333">num</span> <span class="o" style="font-weight: bold">!=</span> <span class="nb" style="color: #0086b3">NULL</span><span class="p">);</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6">
<td class="diff-line-num old_line" data-linenumber="44" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
44
</td>
<td class="diff-line-num new_line" data-linenumber="45" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
45
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC45" class="line" lang="c">      <span class="cm" style="color: #998; font-style: italic">/* Quickly reject empty or impossibly long inputs. */</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6">
<td class="diff-line-num old_line" data-linenumber="45" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
45
</td>
<td class="diff-line-num new_line" data-linenumber="46" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
46
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC46" class="line" lang="c">      <span class="k" style="font-weight: bold">if</span><span class="p">(</span><span class="n" style="color: #333">numlen</span> <span class="o" style="font-weight: bold">==</span> <span class="mi" style="color: #099">0</span> <span class="o" style="font-weight: bold">||</span></span>
</pre>
</td>
</tr>
<tr class="line_holder match" id="" style="line-height: 1.6">
<td class="diff-line-num unfold js-unfold old_line" data-linenumber="124" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">...</td>
<td class="diff-line-num unfold js-unfold new_line" data-linenumber="125" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">...</td>
<td class="line_content match " style="background: #fafafa; color: rgba(0,0,0,0.3); padding-left: 0.5em; padding-right: 0.5em" bgcolor="#fafafa">@@ -124,7 +125,6 @@ decodenetnum(</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6">
<td class="diff-line-num old_line" data-linenumber="124" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
124
</td>
<td class="diff-line-num new_line" data-linenumber="125" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
125
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC125" class="line" lang="c"></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6">
<td class="diff-line-num old_line" data-linenumber="125" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
125
</td>
<td class="diff-line-num new_line" data-linenumber="126" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
126
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC126" class="line" lang="c">     <span class="n" style="color: #333">NTP_INSIST</span><span class="p">(</span><span class="n" style="color: #333">ai</span><span class="o" style="font-weight: bold">-></span><span class="n" style="color: #333">ai_addrlen</span> <span class="o" style="font-weight: bold"><=</span> <span class="k" style="font-weight: bold">sizeof</span><span class="p">(</span><span class="o" style="font-weight: bold">*</span><span class="n" style="color: #333">netnum</span><span class="p">));</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6">
<td class="diff-line-num old_line" data-linenumber="126" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
126
</td>
<td class="diff-line-num new_line" data-linenumber="127" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
127
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC127" class="line" lang="c">     <span class="k" style="font-weight: bold">if</span><span class="p">(</span><span class="n" style="color: #333">netnum</span><span class="p">)</span> <span class="p">{</span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="" style="line-height: 1.6">
<td class="diff-line-num old old_line" data-linenumber="127" style="background: #f8d7d2; border-right-color: #f4c4bc; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#f8d7d2">
127
</td>
<td class="diff-line-num new_line old" data-linenumber="128" style="background: #f8d7d2; border-right-color: #f4c4bc; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#f8d7d2">
 
</td>
<td class="line_content noteable_line old" style="background: #fbe7e4; padding-left: 0.5em; padding-right: 0.5em" bgcolor="#fbe7e4">
<pre style="margin: 0">-<span id="LC127" class="line" lang="c">             <span class="n" style="color: #333">ZERO</span><span class="p">(</span><span class="o" style="font-weight: bold">*</span><span class="n" style="color: #333">netnum</span><span class="p">);</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6">
<td class="diff-line-num old_line" data-linenumber="128" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
128
</td>
<td class="diff-line-num new_line" data-linenumber="128" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
128
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC128" class="line" lang="c">             <span class="n" style="color: #333">memcpy</span><span class="p">(</span><span class="n" style="color: #333">netnum</span><span class="p">,</span> <span class="n" style="color: #333">ai</span><span class="o" style="font-weight: bold">-></span><span class="n" style="color: #333">ai_addr</span><span class="p">,</span> <span class="n" style="color: #333">ai</span><span class="o" style="font-weight: bold">-></span><span class="n" style="color: #333">ai_addrlen</span><span class="p">);</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6">
<td class="diff-line-num old_line" data-linenumber="129" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
129
</td>
<td class="diff-line-num new_line" data-linenumber="129" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
129
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC129" class="line" lang="c">     <span class="p">}</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6">
<td class="diff-line-num old_line" data-linenumber="130" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
130
</td>
<td class="diff-line-num new_line" data-linenumber="130" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
130
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC130" class="line" lang="c">     <span class="n" style="color: #333">freeaddrinfo</span><span class="p">(</span><span class="n" style="color: #333">ai</span><span class="p">);</span></span>
</pre>
</td>
</tr>

</table>
<br>
</li>

</div>
<div class="footer" style="margin-top: 10px">
<p style="color: #777; font-size: small">

<br>
<a href="https://gitlab.com/NTPsec/ntpsec/commit/3d0423deec390de47e514aad1327384e7bcef5d1">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/3d0423deec390de47e514aad1327384e7bcef5d1"}}</script>
</p>
</div>
</body>
</html>