/*
- * $Id: enumerate.c,v 1.14 2002-01-17 16:19:07 jmarcus Exp $
+ * $Id: enumerate.c,v 1.15 2002-01-24 16:32:12 jmarcus Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#include "parse_mtab.h"
#endif /* DID_MTAB */
+#define min(a,b) ((a)<(b)?(a):(b))
+
struct dir *
adddir( vol, dir, name, namlen, upath, upathlen, st )
struct vol *vol;
maxsz = ntohs( maxsz );
ibuf += sizeof( maxsz );
+ maxsz = min(maxsz, *rbuflen);
+
if (( path = cname( vol, dir, &ibuf )) == NULL ) {
*rbuflen = 0;
return( AFPERR_NODIR );