<!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=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>
<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 auto;">
<tbody>
<tr>
<td style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; overflow: hidden;" align="left" bgcolor="#ffffff">
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; border-collapse: separate; border-spacing: 0;">
<tbody>
<tr>
<td style="color: #333333; border-bottom-width: 1px; border-bottom-color: #ededed; border-bottom-style: solid; font-size: 15px; font-weight: bold; line-height: 1.4; padding: 20px 0;">
Merge request <a href="https://gitlab.com/gnutls/libtasn1/-/merge_requests/71">!71</a> was reviewed by <a href="https://gitlab.com/roolebo">Roman Bolshakov</a>
</td>
</tr>
<tr>
<td style="overflow: hidden; font-size: 14px; line-height: 1.4; display: grid;">
<p style="color: #777777;">
<a href="https://gitlab.com/roolebo">Roman Bolshakov</a>
started a new
discussion on <a href="https://gitlab.com/gnutls/libtasn1/-/merge_requests/71#note_500586351">lib/coding.c</a>:
</p>
<table>
<tr class="line_holder" id="">
<td class="old_line diff-line-num" data-linenumber="1085" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
1085
</td>
<td class="new_line diff-line-num" data-linenumber="1085" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
1085
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC1085" class="line" lang="c"> <span class="kt" style="color: #458; font-weight: 600;">int</span> <span class="n" style="color: #333;">err</span><span class="p">;</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="old_line diff-line-num" data-linenumber="1086" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
1086
</td>
<td class="new_line diff-line-num" data-linenumber="1086" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
1086
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC1086" class="line" lang="c"> <span class="kt" style="color: #458; font-weight: 600;">unsigned</span> <span class="kt" style="color: #458; font-weight: 600;">char</span> <span class="o" style="font-weight: 600;">*</span><span class="n" style="color: #333;">der</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">ider</span><span class="p">;</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="old_line diff-line-num new" data-linenumber="1087" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
</td>
<td class="new_line diff-line-num new" data-linenumber="1087" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
1087
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC1087" class="line" lang="c"> <span class="kt" style="color: #458; font-weight: 600;">unsigned</span> <span class="kt" style="color: #458; font-weight: 600;">char</span> <span class="n" style="color: #333;">dummy</span><span class="p">;</span></span>
</pre>
</td>
</tr>
</table>
<div style="border-bottom-width: 1px; border-bottom-color: #ededed; border-bottom-style: solid;">
<p dir="auto">I don't think if we should play with compliant optimizer. Arithmetic on null pointers is UB.</p>
</div>
<p style="color: #777777;">
<a href="https://gitlab.com/roolebo">Roman Bolshakov</a>
started a new
discussion on <a href="https://gitlab.com/gnutls/libtasn1/-/merge_requests/71#note_500586360">lib/coding.c</a>:
</p>
<table>
<tr class="line_holder" id="">
<td class="old_line diff-line-num" data-linenumber="1206" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
1206
</td>
<td class="new_line diff-line-num" data-linenumber="1207" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
1207
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC1207" class="line" lang="c"> <span class="n" style="color: #333;">len2</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">max_len</span><span class="p">;</span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="old_line diff-line-num old" data-linenumber="1207" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
1207
</td>
<td class="new_line diff-line-num old" data-linenumber="1208" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC1207" class="line" lang="c"> <span class="n" style="color: #333;">err</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">_asn1_object_id_der</span> <span class="p">((</span><span class="kt" style="color: #458; font-weight: 600;">char</span><span class="o" style="font-weight: 600;">*</span><span class="p">)</span><span class="n" style="color: #333;">p</span><span class="o" style="font-weight: 600;">-></span><span class="n" style="color: #333;">value</span><span class="p">,</span> <span class="n" style="color: #333;">der</span> <span class="o" style="font-weight: 600;"><span class="idiff left">+</span></span><span class="idiff"> </span><span class="n" style="color: #333;"><span class="idiff right">counter</span></span><span class="p">,</span> <span class="o" style="font-weight: 600;">&</span><span class="n" style="color: #333;">len2</span><span class="p">);</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="old_line diff-line-num new" data-linenumber="1208" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
</td>
<td class="new_line diff-line-num new" data-linenumber="1208" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
1208
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC1208" class="line" lang="c"> <span class="n" style="color: #333;">err</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">_asn1_object_id_der</span> <span class="p">((</span><span class="kt" style="color: #458; font-weight: 600;">char</span><span class="o" style="font-weight: 600;">*</span><span class="p">)</span><span class="n" style="color: #333;">p</span><span class="o" style="font-weight: 600;">-></span><span class="n" style="color: #333;">value</span><span class="p">,</span> <span class="n" style="color: #333;">der</span> <span class="o" style="font-weight: 600;"><span class="idiff left">?</span></span><span class="idiff"> </span><span class="n" style="color: #333;"><span class="idiff">der</span></span><span class="idiff"> </span><span class="o" style="font-weight: 600;"><span class="idiff">+</span></span><span class="idiff"> </span><span class="n" style="color: #333;"><span class="idiff">counter</span></span><span class="idiff"> </span><span class="o" style="font-weight: 600;"><span class="idiff">:</span></span><span class="idiff"> </span><span class="o" style="font-weight: 600;"><span class="idiff">&</span></span><span class="n" style="color: #333;"><span class="idiff right">dummy</span></span><span class="p">,</span> <span class="o" style="font-weight: 600;">&</span><span class="n" style="color: #333;">len2</span><span class="p">);</span></span>
</pre>
</td>
</tr>
</table>
<div style="border-bottom-width: 1px; border-bottom-color: #ededed; border-bottom-style: solid;">
<p dir="auto">Instead we should add <code>counter</code> as a separate parameter to <code>_asn1_object_id_der()</code> and similar functions below right after <code>der</code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #666;">
—
<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/libtasn1/-/merge_requests/71">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
<a href="https://gitlab.com/-/sent_notifications/92c7e2cdafcfbe720e2c9888c940af52/unsubscribe">unsubscribe</a>
from this thread or
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.com/gnutls/libtasn1/-/merge_requests/71"}}</script>
</p>
</div>
</body>
</html>