mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 18:55:12 +00:00
fs: dlm: drop rxbuf manipulation in dlm_copy_master_names
This patch removes the manipulation of the receive buffer in case of an error and be sure the buffer is null terminated before an error messagea is printed out. Instead of manipulate the receive buffer we tell inside the format string the maximum length the string buffer is being read. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
parent
c4f4e135c2
commit
561c67d8a1
@ -245,9 +245,8 @@ void dlm_copy_master_names(struct dlm_ls *ls, char *inbuf, int inlen,
|
||||
if (inlen > 1) {
|
||||
r = find_rsb_root(ls, inbuf, inlen);
|
||||
if (!r) {
|
||||
inbuf[inlen - 1] = '\0';
|
||||
log_error(ls, "copy_master_names from %d start %d %s",
|
||||
nodeid, inlen, inbuf);
|
||||
log_error(ls, "copy_master_names from %d start %d %.*s",
|
||||
nodeid, inlen, inlen, inbuf);
|
||||
goto out;
|
||||
}
|
||||
list = r->res_root_list.next;
|
||||
|
Loading…
Reference in New Issue
Block a user