From 6cfa4da64d08323a0e04826948744b8df98b68d1 Mon Sep 17 00:00:00 2001 From: Alexander Vostres Date: Fri, 6 Mar 2026 17:34:40 +0200 Subject: [PATCH] Fix off-by-one bug in ModuleMetadata --- symbols/pdb/Mono.Cecil.Pdb/ModuleMetadata.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symbols/pdb/Mono.Cecil.Pdb/ModuleMetadata.cs b/symbols/pdb/Mono.Cecil.Pdb/ModuleMetadata.cs index 0bc32dca5..5c8f30dbf 100644 --- a/symbols/pdb/Mono.Cecil.Pdb/ModuleMetadata.cs +++ b/symbols/pdb/Mono.Cecil.Pdb/ModuleMetadata.cs @@ -619,7 +619,7 @@ static void WriteNameBuffer(string name, char* buffer, uint bufferLength, uint* if (buffer != null && bufferLength > 0) { for (int i = 0; i < length; i++) buffer [i] = name [i]; - buffer [length + 1] = '\0'; + buffer [length] = '\0'; } }