Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142763528
D18252.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
728 B
Referenced Files
None
Subscribers
None
D18252.diff
View Options
Index: head/sys/dev/sfxge/common/mcdi_mon.c
===================================================================
--- head/sys/dev/sfxge/common/mcdi_mon.c
+++ head/sys/dev/sfxge/common/mcdi_mon.c
@@ -221,7 +221,13 @@
uint8_t payload[MAX(MC_CMD_READ_SENSORS_EXT_IN_LEN,
MC_CMD_READ_SENSORS_EXT_OUT_LEN)];
uint32_t addr_lo, addr_hi;
+ efx_rc_t rc;
+ if (EFSYS_MEM_SIZE(esmp) < size) {
+ rc = EINVAL;
+ goto fail1;
+ }
+
req.emr_cmd = MC_CMD_READ_SENSORS;
req.emr_in_buf = payload;
req.emr_in_length = MC_CMD_READ_SENSORS_EXT_IN_LEN;
@@ -238,6 +244,11 @@
efx_mcdi_execute(enp, &req);
return (req.emr_rc);
+
+fail1:
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+ return (rc);
}
static __checkReturn efx_rc_t
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 24, 7:41 AM (8 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27894955
Default Alt Text
D18252.diff (728 B)
Attached To
Mode
D18252: sfxge(4): check size of memory to read sensors data to
Attached
Detach File
Event Timeline
Log In to Comment