Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • L liblinphone
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 12
    • Issues 12
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 50
    • Merge requests 50
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • BC
  • public
  • liblinphone
  • Merge requests
  • !2041

Merged
Created May 19, 2022 by Thibault Lemaire@thibault.lemaireMaintainer

Fix UTF8 validation crash on Xamarin

  • Overview 1
  • Commits 1
  • Changes 2

Log messages were passed, unchecked, to the log_message_written callback

On Xamarin this callback is written in C#. So the const char* is converted to a .NET string, which is stored as UTF16. Mono checks for validity and throws an exception when the string contains illegal byte sequences, leading to a crash.

Interestingly, though, I was unable to reproduce the crash on UWP, which uses the .NET Core runtime. The illegal bytes seem to be silently replaced with the replacement character ('�') without throwing.

Parent: linphone-sdk!2877 (merged)

Backport of: !2006 (merged)

Edited May 19, 2022 by Thibault Lemaire
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fix/xamarin-utf8-crash