Bug 17316 - CodeReview: gevents out of bounds index
Summary: CodeReview: gevents out of bounds index
Alias: None
Product: R
Classification: Unclassified
Component: Low-level (show other bugs)
Version: R 3.3.*
Hardware: Other Linux
: P5 enhancement
Assignee: R-core
Depends on:
Reported: 2017-07-23 12:08 UTC by Steve Grubb
Modified: 2017-07-24 10:36 UTC (History)
1 user (show)

See Also:

Patch to fix the issue (1.02 KB, patch)
2017-07-23 12:08 UTC, Steve Grubb
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Grubb 2017-07-23 12:08:15 UTC
In src/main/devices.c R_Devices is defined as:


and comments say that R_MaxDevices set to 64. This means R_Devices can be
accessed with values between 0 and 63. The check for devnum > R_MaxDevices
allows 64 to be used which is outside of the legal limits.

A patch addressing this issue will be attached.
Comment 1 Steve Grubb 2017-07-23 12:08:48 UTC
Created attachment 2280 [details]
Patch to fix the issue
Comment 2 Martin Maechler 2017-07-24 10:36:01 UTC
Thank you for the report and the patch!
I'm commiting the fix.