<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/16148">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">libosmovty: properly initialize vty->fd in vty_new()<br><br>Since we're using talloc_zero(), vty->fd is initialized with 0,<br>which corresponds to stdin. Let's set an invalid value to prevent<br>potential bugs like the one fixed by the recent change [1].<br><br>[1] Icdeaea67a06da3a2f07b252e455629559ecc1829<br><br>Change-Id: Iec15649781317a23e13d2c2840a8f672050f76c1<br>---<br>M src/vty/vty.c<br>1 file changed, 1 insertion(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/48/16148/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/vty/vty.c b/src/vty/vty.c</span><br><span>index cd252ad..8cc2a3a 100644</span><br><span>--- a/src/vty/vty.c</span><br><span>+++ b/src/vty/vty.c</span><br><span>@@ -128,6 +128,7 @@</span><br><span>                 goto out_obuf;</span><br><span> </span><br><span>   new->max = VTY_BUFSIZ;</span><br><span style="color: hsl(120, 100%, 40%);">+     new->fd = -1;</span><br><span> </span><br><span>         return new;</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/16148">change 16148</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmocore/+/16148"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Iec15649781317a23e13d2c2840a8f672050f76c1 </div>
<div style="display:none"> Gerrit-Change-Number: 16148 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>