diff options
author | Jim Meyering <jim@meyering.net> | 2003-05-05 07:31:49 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-05-05 07:31:49 +0000 |
commit | 75fa058191e8bbe101815492808a2be6cd0273b3 (patch) | |
tree | 47b6b412a720e7d3cd9beba22d3eb1f1ce1c9eef /lib | |
parent | 8670b14045a9712adb09b365e8c1b9439c41263b (diff) | |
download | coreutils-75fa058191e8bbe101815492808a2be6cd0273b3.tar.xz |
Avoid array overrun.
(nftw_arr): Update to reflect complete list of members.
(ftw_arr): Likewise
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ftw.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -224,12 +224,17 @@ struct ftw_data as `ftw', map each flag to the subset of values used by `ftw'. */ static const int nftw_arr[] = { - FTW_F, FTW_D, FTW_DNR, FTW_NS, FTW_SL, FTW_DP, FTW_SLN + /* Extract with: + perl -ne '/^ (FTW_\w+)\b[^=]*$/ and print "$1, "' ftw_.h; echo */ + FTW_F, FTW_D, FTW_DNR, FTW_NS, FTW_DCH, FTW_DCHP, FTW_DPRE, FTW_SL, FTW_DP, FTW_SLN }; static const int ftw_arr[] = { - FTW_F, FTW_D, FTW_DNR, FTW_NS, FTW_F, FTW_D, FTW_NS + /* Generate with: + perl -ne '/^ (FTW_\w+)\b[^=]*$/ and print "$1, "' ftw_.h \ + | sed 's/_SL/_F/;s/_DP\>/_D/;s/_SLN/_NS/'; echo */ + FTW_F, FTW_D, FTW_DNR, FTW_NS, FTW_DCH, FTW_DCHP, FTW_DPRE, FTW_F, FTW_D, FTW_NS }; |