View | Details | Raw Unified | Return to bug 321 | Differences between
and this patch

Collapse All | Expand All

(-)openssh-3.4p1/sftp-glob.c (-5 / +2 lines)
Lines 78-89 Link Here
78
	 * Solaris defines dirent->d_name as a one byte array and expects
78
	 * Solaris defines dirent->d_name as a one byte array and expects
79
	 * you to hack around it.
79
	 * you to hack around it.
80
	 */
80
	 */
81
#ifdef BROKEN_ONE_BYTE_DIRENT_D_NAME
82
	strlcpy(ret->d_name, od->dir[od->offset++]->filename, MAXPATHLEN);
83
#else
84
	strlcpy(ret->d_name, od->dir[od->offset++]->filename,
81
	strlcpy(ret->d_name, od->dir[od->offset++]->filename,
85
	    sizeof(ret->d_name));
82
		(sizeof(ret->d_name) <= sizeof(char))?
86
#endif
83
		MAXPATHLEN: sizeof(ret->d_name));
87
#ifdef __GNU_LIBRARY__
84
#ifdef __GNU_LIBRARY__
88
	/*
85
	/*
89
	 * Idiot glibc uses extensions to struct dirent for readdir with
86
	 * Idiot glibc uses extensions to struct dirent for readdir with

Return to bug 321