Page MenuHomeFreeBSD

D15680.diff
No OneTemporary

D15680.diff

Index: head/sys/dev/ofw/ofw_fdt.c
===================================================================
--- head/sys/dev/ofw/ofw_fdt.c
+++ head/sys/dev/ofw/ofw_fdt.c
@@ -279,8 +279,6 @@
/* Emulate the 'name' property */
name = fdt_get_name(fdtp, offset, &len);
strncpy(buf, name, buflen);
- if (len + 1 > buflen)
- len = buflen;
return (len + 1);
}
@@ -299,9 +297,8 @@
if (prop == NULL)
return (-1);
- if (len > buflen)
- len = buflen;
- bcopy(prop, buf, len);
+ bcopy(prop, buf, min(len, buflen));
+
return (len);
}

File Metadata

Mime Type
text/plain
Expires
Thu, Feb 12, 5:48 PM (18 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28668961
Default Alt Text
D15680.diff (547 B)

Event Timeline