Skip to content

Conversation

@KarelChanivecky
Copy link
Contributor

@KarelChanivecky KarelChanivecky commented May 17, 2023

Problem description

In commit Use UCS16LE instead of UCS-2LE UCS2LE was swapped for UTF16LE. This change works fine if libunistring is using the GLIBC iconv_* symbols. However, if libunistring is linked to libiconv instead, the change breaks this library.

In the libiconv manual there is no explicit mention to aliases without dashes being supported, and testing revealed that it in fact does not. https://www.gnu.org/software/libiconv/

Solution

Replace "UTF16LE" with "UTF-16LE" in libunistring calls

Test

  1. build libunistring while linking to libiconv
  2. build gssntlmssp linking to the built libunistring
  3. Test usage of NTOWFv1. Function produced the correct value; returned 0.

@simo5
Copy link
Collaborator

simo5 commented May 17, 2023

Nice catch!
Please sign-off your commit and I will merge.

Signed-off-by: kchaniveckyga <kchaniveckyga@fortinet.com>
@KarelChanivecky
Copy link
Contributor Author

Nice catch! Please sign-off your commit and I will merge.

Done!

@simo5 simo5 merged commit 7624c1f into gssapi:main May 17, 2023
@simo5
Copy link
Collaborator

simo5 commented May 17, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants