1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Move done jump lower

Since before 'goto done' is bufused zeroed, it would otherwise write 1
byte in front of buffer.
This commit is contained in:
Zdenek Kabelac 2012-02-08 11:31:29 +00:00
parent b63b775143
commit 84fd8ea4bd
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
Version 2.02.91 - Version 2.02.91 -
=================================== ===================================
Do not write in front of log buffer in print_log().
Add boundary test for number of mirror devs and logs.
Check that whole locking_dir fits _lock_dir buffer in init_file_locking(). Check that whole locking_dir fits _lock_dir buffer in init_file_locking().
Use list functions for label_exit(). Use list functions for label_exit().
Ensure strncpy() function always ends with '\0'. Ensure strncpy() function always ends with '\0'.

View File

@ -388,8 +388,8 @@ void print_log(int level, const char *file, int line, int dm_errno,
va_end(ap); va_end(ap);
bufused += n; bufused += n;
done:
buf[bufused - 1] = '\n'; buf[bufused - 1] = '\n';
done:
buf[bufused] = '\n'; buf[bufused] = '\n';
buf[sizeof(buf) - 1] = '\n'; buf[sizeof(buf) - 1] = '\n';
/* FIXME real size bufused */ /* FIXME real size bufused */