Ticket #800 (closed defect: fixed)
r.random and r.reclass - buffer overflow on long mapset/map names
| Reported by: | ferrouswheel | Owned by: | grass-dev@… |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.4.3 |
| Component: | Raster | Version: | svn-develbranch6 |
| Keywords: | sprintf, r.reclass, r.random | Cc: | |
| Platform: | All | CPU: | All |
Description
In r.random/support.c there are sprintf calls which cause buffer overflow errors when the map names and mapsets are too long. I've attached a patch to replace with snprintf. This truncates the messages, but the RECORD_LEN for the History struct is by default only 80.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

