nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] avoid writing uninitialized bytes to the lock f


From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] avoid writing uninitialized bytes to the lock file
Date: Sun, 01 Feb 2015 10:40:25 +0100

On Mon, Jan 26, 2015, at 15:04, Kamil Dudka wrote:
> --- a/trunk/nano/src/files.c
> +++ b/trunk/nano/src/files.c
> @@ -195,7 +195,7 @@ int write_lockfile(const char *lockfilename, const char 
> *origfilename, bool modi
>       * our lockfile' message in here...
>       *
>       * This is likely very wrong, so this is a WIP. */
> -    null_at(&lockdata, lockdatalen);
> +    memset(lockdata, 0, lockdatalen);
>      lockdata[0] = 0x62;
>      lockdata[1] = 0x30;
>      lockdata[24] = mypid % 256;

Applied.  Thanks.

Benno

-- 
http://www.fastmail.com - IMAP accessible web-mail




reply via email to

[Prev in Thread] Current Thread [Next in Thread]