Re: Unchecked mallocs in libglusterfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Jonathan,
 Yes, there are a few unchecked mallocs in libglusterfs. The cleanup has
been pending for a while and will soon happen. If you already have a diff
against them, it will be appreciated if you can post it. Even otherwise the
next cleanup cycle is going to fix them.

avati

2008/1/1, Jonathan Bringhurst <fintler@xxxxxxxxx>:
>
> Hey everyone,
>
> This is my first time posting to the list and (as a disclaimer) I'm
> generally a newbie to glusterfs and filesystems in general. I was
> recently poking through the source (in the glusterfs-1.3.7 tarball)
> and noticed a few unchecked mallocs. Here's a few examples...
>
> **************************************
> libglusterfs/src/common-utils.h:105
>
>   struct iovec *newvec = malloc (bytecount);
>
>   for (i=0;i<count;i++) {
>     newvec[i].iov_len = vector[i].iov_len;
>
> **************************************
> libglusterfs/src/common-utils.h:169
>
>   void *newptr = malloc (size);
>   memcpy (newptr, ptr, size);
>
> Is there any plan in place to get these cleaned up? I'd be happy to
> create a nice diff, I'm just unsure as how to proceed. Are there
> syscall wrappers located somewhere in the code base? Should I change
> them to x*alloc? Any suggestions on the matter would be appreciated.
>
> -Jon Bringhurst <fintler@xxxxxxxxx>
>
> P.S. My current motivation on this is to become more familiar with the
> codebase in general before I attempt to implement my (super secret)
> idea for a translator ;)
>
>
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel@xxxxxxxxxx
> http://lists.nongnu.org/mailman/listinfo/gluster-devel
>



-- 
If I traveled to the end of the rainbow
As Dame Fortune did intend,
Murphy would be there to tell me
The pot's at the other end.


[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux