Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142863467
D54825.id170262.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
977 B
Referenced Files
None
Subscribers
None
D54825.id170262.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D54825: xdr_string: don't leak strings with xdr_free
Attached
Detach File
Event Timeline
Log In to Comment