| 1 | --- ../minicom-2.7/src/getsdir.c 2011-02-14 21:07:00.000000000 +1100 |
| 2 | +++ ./src/getsdir.c 2016-04-19 15:47:10.402330875 +1000 |
| 3 | @@ -145,7 +145,7 @@ |
| 4 | * |
| 5 | * The data will be in the form: |
| 6 | * typedef struct dirEntry { |
| 7 | - * char fname[MAXNAMLEN + 1]; |
| 8 | + * char fname[NAME_MAX + 1]; |
| 9 | * time_t time; |
| 10 | * mode_t mode; |
| 11 | * } GETSDIR_ENTRY; |
| 12 | @@ -232,7 +232,7 @@ |
| 13 | } |
| 14 | |
| 15 | /* copy the filename */ |
| 16 | - strncpy((*datptr)[cnt].fname, dp->d_name, MAXNAMLEN); |
| 17 | + strncpy((*datptr)[cnt].fname, dp->d_name, NAME_MAX); |
| 18 | |
| 19 | /* get information about the directory entry */ |
| 20 | snprintf(fpath, sizeof(fpath), "%s/%s", dirpath, dp->d_name); |