<!-- 
RSS generated by JIRA (5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9) at Sat May 25 23:57:48 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.couchbase.com/issues/si/jira.issueviews:issue-xml/CCBC-171/CCBC-171.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Couchbase</title>
    <link>http://www.couchbase.com/issues</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.4</version>
        <build-number>845</build-number>
        <build-date>26-12-2012</build-date>
    </build-info>

<item>
            <title>[CCBC-171] Invalid read in plugin-libevent.c</title>
                <link>http://www.couchbase.com/issues/browse/CCBC-171</link>
                <project id="10070" key="CCBC">Couchbase C client library libcouchbase</project>
                        <description>In plugin-libevent.c, event_new() mallocs a &amp;quot;struct event&amp;quot;, which is not initialized, then passes it to event_assign(), which  passes it into event_base_set(), causing an invalid read. We picked it up during a valgrind run of our program.&lt;br/&gt;
&lt;br/&gt;
See lines 47 - 78 here: &lt;a href=&quot;https://github.com/couchbase/libcouchbase/blob/master/plugins/io/libevent/plugin-libevent.c&quot;&gt;https://github.com/couchbase/libcouchbase/blob/master/plugins/io/libevent/plugin-libevent.c&lt;/a&gt;&lt;br/&gt;
&lt;br/&gt;
Proposed patch:&lt;br/&gt;
&lt;br/&gt;
Index: libcouchbase/src/plugin-libevent.c&lt;br/&gt;
===================================================================&lt;br/&gt;
--- libcouchbase/src/plugin-libevent.c  (revision 16)&lt;br/&gt;
+++ libcouchbase/src/plugin-libevent.c  (working copy)&lt;br/&gt;
@@ -47,7 +47,6 @@&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;event_callback_fn callback,&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;void *arg)&lt;br/&gt;
&amp;nbsp;{&lt;br/&gt;
-    event_base_set(base, ev);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ev-&amp;gt;ev_callback = callback;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ev-&amp;gt;ev_arg = arg;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ev-&amp;gt;ev_fd = fd;&lt;br/&gt;
@@ -56,6 +55,7 @@&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ev-&amp;gt;ev_flags = EVLIST_INIT;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ev-&amp;gt;ev_ncalls = 0;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ev-&amp;gt;ev_pncalls = NULL;&lt;br/&gt;
+    event_base_set(base, ev);&lt;br/&gt;
&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 0;&lt;br/&gt;
&amp;nbsp;}&lt;br/&gt;
</description>
                <environment>Centos 5.5, Couchbase server 1.8, libcouchbase 1.02</environment>
            <key id="21922">CCBC-171</key>
            <summary>Invalid read in plugin-libevent.c</summary>
                <type id="1" iconUrl="http://www.couchbase.com/issues/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.couchbase.com/issues/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.couchbase.com/issues/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10011">Public</security>
                        <assignee username="avsej">Sergey Avseyev</assignee>
                                <reporter username="jamesoc">James</reporter>
                        <labels>
                    </labels>
                <created>Wed, 23 Jan 2013 08:53:46 -0600</created>
                <updated>Wed, 6 Feb 2013 13:48:22 -0600</updated>
                    <resolved>Thu, 31 Jan 2013 02:12:46 -0600</resolved>
                            <version>1.0.7</version>
                <version>2.0.2</version>
                                <fixVersion>2.0.3</fixVersion>
                                <component>library</component>
                                <votes>0</votes>
                        <watches>0</watches>
                          <timeoriginalestimate seconds="7200">2h</timeoriginalestimate>
                    <timeestimate seconds="7200">2h</timeestimate>
                                  <comments>
                    <comment id="49119" author="avsej" created="Thu, 31 Jan 2013 02:12:46 -0600"  >&lt;a href=&quot;http://review.couchbase.org/24316&quot;&gt;http://review.couchbase.org/24316&lt;/a&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                                                                                                                                                    <customfield id="customfield_10081" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Rank</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>8634</customfieldvalue>
                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10181" key="com.atlassian.jira.ext.charting:timeinstatus">
                <customfieldname>Time In Status</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                </customfields>
    </item>
</channel>
</rss>