Re: [PATCH v2 2/2] libmount: handle arbitrary line length for mounts

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

 



On 26 Aug 2015 15:49, Kees Cook wrote:
> --- a/libmount/src/mountP.h
> +++ b/libmount/src/mountP.h
> @@ -212,6 +212,8 @@ struct libmnt_table {
>  	int		comms;		/* enable/disable comment parsing */
>  	char		*comm_intro;	/* First comment in file */
>  	char		*comm_tail;	/* Last comment in file */
> +	char		*buf;		/* Memory for reading lines */
> +	size_t		buf_size;	/* Size of line-reading buffer */

just to be clear, this structure is zero-allocated right ?  getline
needs the first call to have buf==NULL in order for everything to
fall into place.
-mike

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux