00db10
diff -Nru glibc-2.17-c758a686/nis/yp_xdr.c glibc-2.17-c758a686/nis/yp_xdr.c
00db10
--- glibc-2.17-c758a686/nis/yp_xdr.c	2012-12-24 22:02:13.000000000 -0500
00db10
+++ glibc-2.17-c758a686/nis/yp_xdr.c	2013-04-17 15:26:50.168999686 -0400
00db10
@@ -32,6 +32,14 @@
00db10
 #include <rpcsvc/yp.h>
00db10
 #include <rpcsvc/ypclnt.h>
00db10
 
00db10
+/* The specification suggests 1024 as a maximum length of all fields, 
00db10
+   but current linux systems usually don't use any limits. So, to stay 
00db10
+   as much compatible as possible with recent linux systems we choose 
00db10
+   limits large enough to avoid problems. */
00db10
+
00db10
+#define XDRMAXNAME 1024
00db10
+#define XDRMAXRECORD 16 * 1024 * 1024
00db10
+
00db10
 bool_t
00db10
 xdr_ypstat (XDR *xdrs, ypstat *objp)
00db10
 {
00db10
@@ -49,21 +57,21 @@ libnsl_hidden_def (xdr_ypxfrstat)
00db10
 bool_t
00db10
 xdr_domainname (XDR *xdrs, domainname *objp)
00db10
 {
00db10
-  return xdr_string (xdrs, objp, YPMAXDOMAIN);
00db10
+  return xdr_string (xdrs, objp, XDRMAXNAME);
00db10
 }
00db10
 libnsl_hidden_def (xdr_domainname)
00db10
 
00db10
 bool_t
00db10
 xdr_mapname (XDR *xdrs, mapname *objp)
00db10
 {
00db10
-  return xdr_string (xdrs, objp, YPMAXMAP);
00db10
+  return xdr_string (xdrs, objp, XDRMAXNAME);
00db10
 }
00db10
 libnsl_hidden_def (xdr_mapname)
00db10
 
00db10
 bool_t
00db10
 xdr_peername (XDR *xdrs, peername *objp)
00db10
 {
00db10
-  return xdr_string (xdrs, objp, YPMAXPEER);
00db10
+  return xdr_string (xdrs, objp, XDRMAXNAME);
00db10
 }
00db10
 libnsl_hidden_def (xdr_peername)
00db10
 
00db10
@@ -71,7 +79,7 @@ bool_t
00db10
 xdr_keydat (XDR *xdrs, keydat *objp)
00db10
 {
00db10
   return xdr_bytes (xdrs, (char **) &objp->keydat_val,
00db10
-		    (u_int *) &objp->keydat_len, YPMAXRECORD);
00db10
+		    (u_int *) &objp->keydat_len, XDRMAXRECORD);
00db10
 }
00db10
 libnsl_hidden_def (xdr_keydat)
00db10
 
00db10
@@ -79,7 +87,7 @@ bool_t
00db10
 xdr_valdat (XDR *xdrs, valdat *objp)
00db10
 {
00db10
   return xdr_bytes (xdrs, (char **) &objp->valdat_val,
00db10
-		    (u_int *) &objp->valdat_len, YPMAXRECORD);
00db10
+		    (u_int *) &objp->valdat_len, XDRMAXRECORD);
00db10
 }
00db10
 libnsl_hidden_def (xdr_valdat)
00db10