Unchecked mallocs in libglusterfs

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

 



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 ;)




[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