1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +08:00
osu-lazer/osu.Game
Bartłomiej Dach e57d7d1205
Fix MemoryStreamArchiveReader.GetStream() failing in some cases
`MemoryStreamArchiveReader` introduced in
0657b55196 would previously use
`MemoryStream.GetBuffer()` to retrieve the underlying byte buffer with
stream data. However, this is not generally the method you would want,
for two reasons:

1. It can fail if the stream wasn't created in the way that supports it.
2. As per

	https://learn.microsoft.com/en-us/dotnet/api/system.io.memorystream.getbuffer?view=net-7.0#system-io-memorystream-getbuffer,

   it will return the _raw_ contents of the buffer, including
   potentially unused bytes.

To fix, use `MemoryStream.ToArray()` instead, which avoids both
pitfalls. Notably, `ToArray()` always returns the full contents of the
buffer, regardless of `Position`, as documented in:

    https://learn.microsoft.com/en-us/dotnet/api/system.io.memorystream.toarray?view=net-7.0#system-io-memorystream-toarray
2023-09-18 11:50:36 +02:00
..
Audio Add basic implementation of argon osu!taiko hitsounds (volume / flourish / strong) 2023-07-05 18:44:27 +09:00
Beatmaps Fix dummy beatmap showing AR 5 on song select 2023-09-15 20:26:17 -07:00
Collections Add pop-in/pop-out sfx to more overlays 2023-08-17 18:36:37 +09:00
Configuration Add leaderboard toggle as tracked setting to give better use visibility 2023-08-16 16:17:56 +09:00
Database Bring back disposal of stream after copy-out to MemoryStream 2023-09-14 19:36:35 +02:00
Extensions Handle culture code differences of Traditional Chinese 2023-06-08 03:27:05 +03:00
Graphics Merge branch 'master' into map_info_on_mod_settings 2023-09-11 09:55:54 +02:00
Input Remove global action container input queue workaround 2023-08-21 17:54:08 +02:00
IO Fix MemoryStreamArchiveReader.GetStream() failing in some cases 2023-09-18 11:50:36 +02:00
IPC
Localisation Change display text from "difficulty" to "score" multiplier 2023-09-13 20:01:19 +09:00
Models Remove usages of [ExcludeFromDynamicCompile] 2023-05-08 18:12:56 +09:00
Online Fix link protocol allowlist allowing too much 2023-09-18 09:20:24 +02:00
Overlays Merge branch 'master' into mod-select-difficulty-multiplier-animation 2023-09-14 16:23:30 +02:00
Performance Automated pass 2023-06-24 01:00:03 +09:00
Properties Automated pass 2023-06-24 01:00:03 +09:00
Replays Show smoke in replays 2022-09-18 17:55:06 -07:00
Rulesets Merge branch 'master' into no-legacy-difficulty-control-point 2023-09-15 11:14:28 +02:00
Scoring Rename new flag and update xmldoc to match 2023-08-21 19:36:22 +09:00
Screens Merge branch 'master' into import-task-improve 2023-09-14 19:37:01 +02:00
Skinning Merge branch 'master' into fix-mania-skin-lookups-no-sprites 2023-09-06 19:29:13 +02:00
Storyboards Change IBeatSyncProvider.Clock to always be non-null 2023-07-13 22:13:40 +09:00
Tests Remove global action container input queue workaround 2023-08-21 17:54:08 +02:00
Updater use fa_download for updates instead of fa_upload 2023-07-16 15:21:15 -04:00
Users Use @2x variant of profile badges 2023-09-06 16:17:53 -07:00
Utils Enable sentry "global mode" as per recommendation 2023-08-24 03:23:18 +09:00
.editorconfig
BackgroundDataStoreProcessor.cs Rename new flag and update xmldoc to match 2023-08-21 19:36:22 +09:00
FodyWeavers.xml More realm analytic disables 2023-07-20 17:51:33 +09:00
osu!.res
osu.Game.csproj Update framework and resources 2023-09-14 08:24:18 +02:00
OsuGame.cs Rename BackgroundBeatmapProcessor to BackgroundDataStoreProcessor 2023-07-26 16:22:10 +09:00
OsuGameBase_Importing.cs Automated pass 2023-06-24 01:00:03 +09:00
OsuGameBase.cs Remove global action container input queue workaround 2023-08-21 17:54:08 +02:00
PerformFromMenuRunner.cs Partial everything 2022-11-27 00:00:27 +09:00