Skip to content

Commit

Permalink
Fix FlashSplicer buffer access during save
Browse files Browse the repository at this point in the history
  • Loading branch information
jglim committed Apr 28, 2022
1 parent c9ec0d2 commit fb66526
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Caesar/Diogenes/Forms/FlashSplicer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ we need to..
int flashDataFileOffset = FlashContainer.CaesarFlashHeader.CffHeaderSize + FlashContainer.CaesarFlashHeader.LanguageBlockLength + 0x414;
byte[] nonFlashData = FlashBytes.Take(flashDataFileOffset).ToArray();

using (BinaryReader reader = new BinaryReader(new MemoryStream(FlashBytes)))
using (BinaryReader reader = new BinaryReader(new MemoryStream(FlashBytes, 0, FlashBytes.Length, false, true)))
using (BinaryWriter nonFlashWriter = new BinaryWriter(new MemoryStream(nonFlashData)))
using (BinaryWriter flashPayloadWriter = new BinaryWriter(new MemoryStream()))
{
Expand Down

0 comments on commit fb66526

Please sign in to comment.