Re: [PATCH] Btrfs-progs use safe string manipulation functions

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

 



On Thu, 2011-02-10 at 14:52 +0100, Olaf van der Spek wrote:
> On Thu, Feb 10, 2011 at 2:37 PM, Eduardo Silva <eduardo.silva@xxxxxxxxxx> wrote:
> > string_copy seems pointless, it's kinda equivalent to strcpy.
> >
> > Yeah, but if we are thinking into write some wrappers let's create a couple
> > for the major string manipulation used...
> 
> A wrapper should have a benefit, your string_copy doesn't have any.

It have it, take this example:

	char *a;
        a = malloc(1024);
        strcpy(a, NULL);

at least with the wrapper you will get a notice about what's going
on... 



--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux