Browse Source

UPD: potential memory out-of-bounds detection in Plugin Extension

rich2014 3 months ago
parent
commit
2baeda7ec9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/uextension.pas

+ 2 - 1
src/uextension.pas

@@ -106,7 +106,8 @@ begin
     DialogBoxParam:= @fDialogBox.DialogBoxParam;
     DialogBoxParam:= @fDialogBox.DialogBoxParam;
     SetProperty:= @fDialogBox.SetProperty;
     SetProperty:= @fDialogBox.SetProperty;
     GetProperty:= @fDialogBox.GetProperty;
     GetProperty:= @fDialogBox.GetProperty;
-    LanguageID:= Language;
+    if Language.Length < sizeof(LanguageID) then
+      LanguageID:= Language;
     CreateComponent:= @fDialogBox.CreateComponent;
     CreateComponent:= @fDialogBox.CreateComponent;
   end;
   end;
 end;
 end;