Re: [PATCH] Fix gitmkdtemp: correct test for mktemp() return value

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

 



Filippo Negroni <fnegroni@xxxxxxxxxxxxxxxxxxx> writes:

> From 5e3b362cdd86150de901312c01beac9596b7e2ba Mon Sep 17 00:00:00 2001
> From: Filippo Negroni <fnegroni@xxxxxxxxxxxxxxxxxxx>
> Date: Thu, 25 Feb 2010 09:39:56 +0000
> Subject: [PATCH] Fix gitmkdtemp: correct test for mktemp() return value
>
> In gitmkdtemp, the return value of mktemp is not tested correctly.
> mktemp() always returns its 'template' argument, even upon failre.
> Upon failure, mktemp sets template to be an empty string: its first character is '\0'.
> This patch ensures the return value of mktemp is correctly tested by dereferencing the pointer returned by it.
>
> Signed-off-by: Filippo Negroni <fnegroni@xxxxxxxxxxxxxxxxxxx>
> ---

Thanks.

Next time please do not quote the mbox header lines (i.e. start your body
with "In gitmkdtemp, the return value ...".
--
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]