reactos/base/applications/cmdutils
Hermès Bélusca-Maïto ec0cc847b9
[ATTRIB] De-duplicate code; handle reparse points; verify path concatenation (#4215)
- Simplify duplicated code by having one EnumFiles() function using
  callbacks to perform actual action on enumerated files.

  PrintAttribute() and ChangeAttribute() duplicate their functionality,
  except for the actual difference of displaying the file attributes vs.
  changing them.
  Instead, move that per-file action into two callbacks, create a file
  enumerator function that contains the common functionality, and make
  it call the callback passed in parameter to it.

- Reparse points can be encountered during enumeration. In this case,
  don't try to go into too many reparse-point levels (maximum two).

- Verify that paths/file names concatenation don't overflow (with the
  StringCch* functions returning an error), as this could cause an
  infinite loop in case of recursive-enumeration, and the position where
  the new path part would be appended turns out to be just at the end
  of the buffer.
2023-08-11 13:49:27 +02:00
..
at [TRANSLATION] Add/Update Turkish (tr-TR) translations (#4959) 2023-02-15 17:29:52 +01:00
attrib [ATTRIB] De-duplicate code; handle reparse points; verify path concatenation (#4215) 2023-08-11 13:49:27 +02:00
certutil
chcp [REACTOS] "http://www.reactos" -> "https://reactos" (#5043) 2023-02-06 17:01:52 +03:00
clip
comp
cscript
dbgprint
doskey [REACTOS] "http://www.reactos" -> "https://reactos" (#5043) 2023-02-06 17:01:52 +03:00
eventcreate
fc [FC] Update Romanian translation (#5292) 2023-05-21 14:31:12 +02:00
find [REACTOS] "http://www.reactos" -> "https://reactos" (#5043) 2023-02-06 17:01:52 +03:00
fsutil
help [TRANSLATION] Improve Simplified Chinese (zh-CN) translation (#4979) 2023-02-10 23:15:25 +09:00
hostname
label [REACTOS] "http://www.reactos" -> "https://reactos" (#5043) 2023-02-06 17:01:52 +03:00
lodctr
mode [MODE] Fix Romanian (ro-RO) translation (#5434) 2023-07-13 19:24:26 +03:00
mofcomp
more [REACTOS] "http://www.reactos" -> "https://reactos" (#5043) 2023-02-06 17:01:52 +03:00
reg [TRANSLATION] Add/Update Turkish (tr-TR) translations (#4959) 2023-02-15 17:29:52 +01:00
schtasks
sort
taskkill [TASKMGR][TASKKILL][HIVESYS] Russian translation update (#5120) 2023-05-05 22:31:29 +02:00
tasklist [TASKLIST] Update Polish (pl-PL) translation (#5415) 2023-07-10 22:08:56 +03:00
timeout [TRANSLATION] Add/Update Turkish (tr-TR) translations (#4959) 2023-02-15 17:29:52 +01:00
tree
where [CMDUTILS] Add Italian (it-IT) translation for WHERE command 2023-03-01 22:05:04 +01:00
whoami
wmic [TRANSLATION] Add/Update Turkish (tr-TR) translations (#4959) 2023-02-15 17:29:52 +01:00
wscript
xcopy
CMakeLists.txt