Changeset 896 in openpam


Ignore:
Timestamp:
Jan 17, 2017, 2:34:00 PM (4 years ago)
Author:
Dag-Erling Smørgrav
Message:

merge r745: (belatedly) add defensive length check to strlcpy()

Location:
branches/nooath
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/nooath

    • Property svn:mergeinfo changed
      /trunkmerged: 745
  • branches/nooath/lib/libpam/openpam_configure.c

    r895 r896  
    411411                /* construct filename */
    412412                len = strlcpy(filename, *path, sizeof filename);
     413                if (len >= sizeof filename) {
     414                        errno = ENAMETOOLONG;
     415                        RETURNN(-1);
     416                }
    413417                if (filename[len - 1] == '/') {
    414418                        len = strlcat(filename, service, sizeof filename);
Note: See TracChangeset for help on using the changeset viewer.