Skip to content

tool_getpass: restore UWP getpass_r(), fixup CI builds, fix UWP -Wnull-dereference #15638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 28 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Nov 26, 2024


w/o whitespace: https://github.com/curl/curl/pull/15638/files?w=1

@vszakats vszakats added the Windows Windows-specific label Nov 26, 2024
@github-actions github-actions bot added cmdline tool CI Continuous Integration labels Nov 26, 2024
```
D:/a/curl/curl/lib/vtls/schannel_verify.c: In function 'Curl_verify_host':
D:/a/curl/curl/lib/vtls/schannel_verify.c:558:33: error: null pointer dereference [-Werror=null-dereference]
  558 |     for(i = 0; i < alt_name_info->cAltEntry; ++i) {
      |                    ~~~~~~~~~~~~~^~~~~~~~~~~
D:/a/curl/curl/lib/vtls/schannel_verify.c:559:50: error: null pointer dereference [-Werror=null-dereference]
  559 |       PCERT_ALT_NAME_ENTRY entry = &alt_name_info->rgAltEntry[i];
      |                                     ~~~~~~~~~~~~~^~~~~~~~~~~~
```
https://github.com/curl/curl/actions/runs/12022656065/job/33515255397?pr=15638#step:19:27
@vszakats vszakats marked this pull request as draft November 26, 2024 03:42
@vszakats vszakats marked this pull request as ready for review November 26, 2024 11:44
@vszakats vszakats changed the title TEST: tool_getpass + mingw-w64 + UWP windows: restore getpass_r() for UWP, fixup CI builds Nov 26, 2024
@vszakats vszakats changed the title windows: restore getpass_r() for UWP, fixup CI builds tool_getpass: restore getpass_r() for UWP, fixup CI builds Nov 26, 2024
@vszakats vszakats changed the title tool_getpass: restore getpass_r() for UWP, fixup CI builds tool_getpass: restore getpass_r() for UWP, fixup CI builds, fix UWP -Wnull-dereference Nov 26, 2024
@vszakats vszakats changed the title tool_getpass: restore getpass_r() for UWP, fixup CI builds, fix UWP -Wnull-dereference tool_getpass: restore UWP getpass_r(), fixup CI builds, fix UWP -Wnull-dereference Nov 26, 2024
@vszakats vszakats changed the title tool_getpass: restore UWP getpass_r(), fixup CI builds, fix UWP -Wnull-dereference tool_getpass: restore UWP getpass_r(), fixup CI builds, fix schannel -Wnull-dereference Nov 26, 2024
@vszakats vszakats changed the title tool_getpass: restore UWP getpass_r(), fixup CI builds, fix schannel -Wnull-dereference tool_getpass: restore UWP getpass_r(), fixup CI builds, fix UWP -Wnull-dereference Nov 26, 2024
@vszakats vszakats closed this in 72edb22 Nov 26, 2024
@vszakats vszakats deleted the w-getch-more branch November 26, 2024 12:02
vszakats added a commit that referenced this pull request Nov 27, 2024
`getch()` is deprecated according to MSDN:
https://learn.microsoft.com/cpp/c-runtime-library/reference/getch
"The Microsoft-specific function name `getch` is a deprecated alias
for the `_getch` function."

Ref: https://learn.microsoft.com/cpp/c-runtime-library/reference/getch-getwch

Follow-up to 72edb22 #15638
Closes #15642
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
…null-dereference`

- GHA/windows: switch mingw-w64 UWP CI job to use UCRT.
  `msvcr120_app` was missing `getch()` for example.
  Follow-up to f988842 curl#15637
  This job tests compiling for UWP correctly, but the the resulting
  `curl.exe` still doesn't look like a correct UWP app, now exiting
  on startup with: `curl: error initializing curl library`.

- tool_getpass: restore `getch()` for UWP builds.
  Follow-up to f988842 curl#15637

- schannel: silence `-Werror=null-dereference` warning in mingw-w64 UWP:
  ```
  lib/vtls/schannel_verify.c: In function 'Curl_verify_host':
  lib/vtls/schannel_verify.c:558:33: error: null pointer dereference [-Werror=null-dereference]
    558 |     for(i = 0; i < alt_name_info->cAltEntry; ++i) {
        |                    ~~~~~~~~~~~~~^~~~~~~~~~~
  lib/vtls/schannel_verify.c:559:50: error: null pointer dereference [-Werror=null-dereference]
    559 |       PCERT_ALT_NAME_ENTRY entry = &alt_name_info->rgAltEntry[i];
        |                                     ~~~~~~~~~~~~~^~~~~~~~~~~~
  ```
  Ref: https://github.com/curl/curl/actions/runs/12022656065/job/33515255397?pr=15638#step:19:27
  Follow-up to 9640a8e curl#15421

- GHA/windows: fix `find` command in MSVC job step.
  Follow-up to 5f9411f curl#15380

- GHA/windows: drop unnecessary `windowsappcompat` lib from mingw-w64
  UWP job. Also drop related MSYS2 package.

- GHA/windows: cmake 3.31.0 still invokes `windres` with wrong options
  with mingw-w64 UPW. Update curl version in comment accordingly.

- GHA/windows: tidy up mingw-w64 UWP spec logic, limit it to gcc.

- GHA/windows: update comments on `curl.exe` UWP startup errors.

Closes curl#15638
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
`getch()` is deprecated according to MSDN:
https://learn.microsoft.com/cpp/c-runtime-library/reference/getch
"The Microsoft-specific function name `getch` is a deprecated alias
for the `_getch` function."

Ref: https://learn.microsoft.com/cpp/c-runtime-library/reference/getch-getwch

Follow-up to 72edb22 curl#15638
Closes curl#15642
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration cmdline tool Windows Windows-specific
Development

Successfully merging this pull request may close these issues.

1 participant