Changeset 71a8446 in rtems


Ignore:
Timestamp:
Jan 3, 2018, 3:09:05 PM (19 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
3535439f
Parents:
87b7117f
git-author:
Sebastian Huber <sebastian.huber@…> (01/03/18 15:09:05)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/07/18 07:58:30)
Message:

libdl: Fix potential overwrite of dest buffer

Update #2843.

Location:
cpukit/libdl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libdl/rap.c

    r87b7117f r71a8446  
    420420  rtems_rap_data_t* rap = rtems_rap_lock ();
    421421  int               last_errno = rap->last_errno;
    422   strncpy (message, rap->last_error, sizeof (rap->last_error));
     422  strlcpy (message, rap->last_error, max_message);
    423423  rtems_rap_unlock ();
    424424  return last_errno;
  • cpukit/libdl/rtl-error.c

    r87b7117f r71a8446  
    4545  {
    4646    int last_errno = rtl->last_errno;
    47     strncpy (message, rtl->last_error, sizeof (rtl->last_error));
     47    strlcpy (message, rtl->last_error, max_message);
    4848    rtems_rtl_unlock ();
    4949    return last_errno;
Note: See TracChangeset for help on using the changeset viewer.