Avoiding to write uninitialized bytes to the lock file.
Patch by Kamil Dudka. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5108 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
57fa775f25
Коммит
92896a708d
@ -1,3 +1,7 @@
|
|||||||
|
2015-02-01 Kamil Dudka <kdudka@redhat.com>
|
||||||
|
* src/files.c (write_lockfile): Avoid writing uninitialized bytes to
|
||||||
|
the lock file -- a simple null_at() would not initialize the buffer.
|
||||||
|
|
||||||
2015-02-01 Benno Schulenberg <bensberg@justemail.net>
|
2015-02-01 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/winio.c (do_credits): Add a general entry for all translators.
|
* src/winio.c (do_credits): Add a general entry for all translators.
|
||||||
* src/nano.c (version), src/winio.c (do_credits): Update the copyright
|
* src/nano.c (version), src/winio.c (do_credits): Update the copyright
|
||||||
|
@ -195,7 +195,7 @@ int write_lockfile(const char *lockfilename, const char *origfilename, bool modi
|
|||||||
* our lockfile' message in here...
|
* our lockfile' message in here...
|
||||||
*
|
*
|
||||||
* This is likely very wrong, so this is a WIP. */
|
* This is likely very wrong, so this is a WIP. */
|
||||||
null_at(&lockdata, lockdatalen);
|
memset(lockdata, 0, lockdatalen);
|
||||||
lockdata[0] = 0x62;
|
lockdata[0] = 0x62;
|
||||||
lockdata[1] = 0x30;
|
lockdata[1] = 0x30;
|
||||||
lockdata[24] = mypid % 256;
|
lockdata[24] = mypid % 256;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user