Commit 2637167
Cygwin: cygwin_conv_path: don't write to
In the CCP_POSIX_TO_WIN_W path, when `from` is a device,
cygwin_conv_path would attempt to write to the `to` buffer before the
validation of the `size`. This resulted in an EFAULT error in the
common use-case of passing `to` as NULL and `size` as 0 to get the
required size of `to` for the conversion (as used in
cygwin_create_path). Instead, set a boolean and write to `to`
after validation.
Fixes: 43f65cd ("* Makefile.in (DLL_OFILES): Add fhandler_procsys.o.")
Addresses: https://cygwin.com/pipermail/cygwin/2025-April/258068.html
Signed-off-by: Jeremy Drake <[email protected]>
(cherry picked from commit 5dd3d58)to before size is validated.1 parent 60da503 commit 2637167
2 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3911 | 3911 | | |
3912 | 3912 | | |
3913 | 3913 | | |
| 3914 | + | |
3914 | 3915 | | |
3915 | 3916 | | |
3916 | 3917 | | |
| |||
4019 | 4020 | | |
4020 | 4021 | | |
4021 | 4022 | | |
4022 | | - | |
| 4023 | + | |
4023 | 4024 | | |
4024 | 4025 | | |
4025 | 4026 | | |
| |||
4075 | 4076 | | |
4076 | 4077 | | |
4077 | 4078 | | |
| 4079 | + | |
| 4080 | + | |
4078 | 4081 | | |
4079 | 4082 | | |
4080 | 4083 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments