<div dir="ltr">Missed to click "reply all" earlier :)</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 2, 2017 at 9:34 PM, Xavi Hernandez <span dir="ltr"><<a href="mailto:jahernan@redhat.com" target="_blank">jahernan@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Atin,<span class=""><div><br></div><div>On 2 November 2017 at 16:31, Atin Mukherjee <span dir="ltr"><<a href="mailto:atin.mukherjee83@gmail.com" target="_blank">atin.mukherjee83@gmail.com</a>></span> wrote:<br></div></span><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="m_4121482800435729481gmail-">On Thu, Nov 2, 2017 at 3:35 PM, Xavi Hernandez <span dir="ltr"><<a href="mailto:jahernan@redhat.com" target="_blank">jahernan@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>Several times I've seen issues with the way strings are handled in many parts of the code. Sometimes it's because of an incorrect use of some functions, like strncat(). Others it's because of a lack of error conditions check. Others it's a failure in allocating the right amount of memory, or even creating a big array in the stack.</div><div><br></div><div>Maybe we should create a set of library functions to work with strings to hide all these details and make it easier (and less error prone) to manipulate strings. I've something already written some time ago that I can adapt to gluster.</div><div><br></div><div>On top of that we could expand it by adding path manipulation functions and string parsing features. </div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>Do you think it's worth it ?</div></div></blockquote><div><br></div></span><div>+1, one of the the major offender I see is strncpy () where it has been handled differently across the code base.</div><div><br></div></div></div></div></blockquote><div><br></div></span><div>I've just created a GitHub issue [1] to track this.</div><div><br></div><div>Xavi</div><div><br></div><div>[1] <a href="https://github.com/gluster/glusterfs/issues/348" target="_blank">https://github.com/<wbr>gluster/glusterfs/issues/348</a></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class="m_4121482800435729481gmail-m_3931953522525308878HOEnZb"><font color="#888888"><div><br></div><div>Xavi</div><div><br></div><div><br></div></font></span></div>
<br>______________________________<wbr>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="http://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://lists.gluster.org/mailm<wbr>an/listinfo/gluster-devel</a><br></blockquote></div><br></div></div>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div>