kernel-fxtec-pro1x/fs/ocfs2/dlm
Dan Carpenter e372357ba5 ocfs2: tighten up strlen() checking
This function is only called from one place and it's like this:
	dlm_register_domain(conn->cc_name, dlm_key, &fs_version);

The "conn->cc_name" is 64 characters long.  If strlen(conn->cc_name)
were equal to O2NM_MAX_NAME_LEN (64) that would be a bug because
strlen() doesn't count the NULL character.

In fact, if you look how O2NM_MAX_NAME_LEN is used, it mostly describes
64 character buffers.  The only exception is nd_name from struct
o2nm_node.

Anyway I looked into it and in this case the domain string comes from
osb->uuid_str in ocfs2_setup_osb_uuid().  That's 32 characters and NULL
which easily fits into O2NM_MAX_NAME_LEN.  This patch doesn't change how
the code works, but I think it makes the code a little cleaner.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
2010-07-12 13:57:53 -07:00
..
dlmapi.h ocfs2/trivial: Remove trailing whitespaces 2010-01-25 19:20:51 -08:00
dlmast.c Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2 2010-05-21 07:20:17 -07:00
dlmcommon.h ocfs2:dlm: avoid dlm->ast_lock lockres->spinlock dependency break 2010-05-18 16:41:34 -07:00
dlmconvert.c Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2 2010-05-21 07:20:17 -07:00
dlmconvert.h
dlmdebug.c ocfs2/dlm: Fix printing of lockname 2010-02-08 13:01:31 -08:00
dlmdebug.h [PATCH 2/3] ocfs2/dlm: Silence build warnings 2008-05-30 15:15:10 -07:00
dlmdomain.c ocfs2: tighten up strlen() checking 2010-07-12 13:57:53 -07:00
dlmdomain.h
dlmlock.c fs/ocfs2/dlm: Drop memory allocation cast 2010-05-18 12:31:10 -07:00
dlmmaster.c Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2 2010-05-21 07:20:17 -07:00
dlmrecovery.c ocfs2/dlm: don't access beyond bitmap size 2010-07-12 13:56:14 -07:00
dlmthread.c Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2 2010-05-21 07:20:17 -07:00
dlmunlock.c Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2 2010-05-21 07:20:17 -07:00
dlmver.c
dlmver.h
Makefile ocfs2_dlmfs: Move to its own directory 2010-02-26 15:41:14 -08:00