<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:等线;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"\@等线";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:等线;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:等线;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:等线;}
/* Page Definitions */
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="ZH-CN" link="#0563C1" vlink="#954F72" style="text-justify-trim:punctuation">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi Team,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">We tried nginx-quic on our server and found a problem. Please refer to the changeset below.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Yu Liu<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"># HG changeset patch<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"># User Yu Liu <<a href="mailto:liu.yub@trip.com">liu.yub@trip.com</a>><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"># Date 1621502282 -28800<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"># Thu May 20 17:18:02 2021 +0800<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"># Branch quic<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"># Node ID 4055a366b23e29215f3b4eb1d104303e33266cd4<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"># Parent 557dc6a06ba6ea7e78444067c4b8fbb022f7b191<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Fix the infinite loop issue<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">When bits is greater than or equal to 3, value is always shifted 62 bits to the right. So when the input number is greater than 2 to the power of 62, this method will loop endlessly.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">diff -r 557dc6a06ba6 -r 4055a366b23e src/event/quic/ngx_event_quic_transport.c<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">--- a/src/event/quic/ngx_event_quic_transport.c Tue May 18 18:17:25 2021 +0300<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">+++ b/src/event/quic/ngx_event_quic_transport.c Thu May 20 17:18:02 2021 +0800<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">@@ -250,7 +250,7 @@<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> ngx_uint_t bits;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> bits = 0;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">- while (value >> ((8 << bits) - 2)) {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">+ while (bits <=3 && (value >> ((8 << bits) - 2))) {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> bits++;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>