Re: [PATCH v2 1/3] Introduce die_errno() that appends strerror(errno) to die()

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

 



On Samstag, 6. Juni 2009, Thomas Rast wrote:
> +void die_errno(const char *err, ...)
> +{
> +	va_list params;
> +	char msg[1024];
> +
> +	va_start(params, err);
> +
> +	vsnprintf(msg, sizeof(msg), err, params);
> +	die("%s: %s", msg, strerror(errno));

Cannot vsnprintf potentially modify errno?

> +
> +	va_end(params);

This va_end should better be before die().

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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]