Page MenuHomeFreeBSD

D54825.id170262.diff
No OneTemporary

D54825.id170262.diff

diff --git a/lib/libc/xdr/xdr.c b/lib/libc/xdr/xdr.c
--- a/lib/libc/xdr/xdr.c
+++ b/lib/libc/xdr/xdr.c
@@ -696,6 +696,13 @@
if (sp == NULL) {
return(TRUE); /* already free */
}
+ /*
+ * XXX: buggy software may call this without a third
+ * argument via xdr_free(). Ignore maxsize since it may
+ * be invalid. Otherwise, if it's very small, we might
+ * fail to free the string.
+ */
+ maxsize = RPC_MAXDATASIZE;
/* FALLTHROUGH */
case XDR_ENCODE:
size = strlen(sp);
diff --git a/sys/xdr/xdr.c b/sys/xdr/xdr.c
--- a/sys/xdr/xdr.c
+++ b/sys/xdr/xdr.c
@@ -620,6 +620,13 @@
if (sp == NULL) {
return(TRUE); /* already free */
}
+ /*
+ * XXX: buggy software may call this without a third
+ * argument via xdr_free(). Ignore maxsize since it may
+ * be invalid. Otherwise, if it's very small, we might
+ * fail to free the string.
+ */
+ maxsize = RPC_MAXDATASIZE;
/* FALLTHROUGH */
case XDR_ENCODE:
size = strlen(sp);

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 25, 6:58 AM (2 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27929980
Default Alt Text
D54825.id170262.diff (977 B)

Event Timeline