[OpenAFS-devel] issues on openafs-1.2.8/src/afs/HPUX/osi_vnodeops.c

yf fyou@dsguardian.com
10 Mar 2003 10:54:12 +0800


in line 60: m_cpytoc(m, off, len, cp)

	while (len && m) {
		ml = m->m_len; /** should be this one changed to
					ml=MIN(len, m->m_len);
					to avoid following one line's
 					perhaps memory violence???
				**/
		memcpy(cp, mtod(m, caddr_t), (u_int)ml);
		cp += ml;
		len -= ml;
		m = m->m_next;
	}

	return (len);