View Issue Details

IDProjectCategoryView StatusLast Update
0026167PatchesPatchpublic2014-05-14 13:20
ReporterVaclav Valicek Assigned ToBart Broersma  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Target Version1.2.4 
Summary0026167: [PoChecker] Invalid argument(s) passed for format funct., crash
DescriptionProblem is around not existing master file. Format function recieves just one param, but excepts two. In resourcestrings, translations etc. are two %s.

I'm attaching bugfix patch, but not sure if it's under your's project's coding habbits :)
Steps To Reproduce1. Run PoChecker
2. Find somefile.lang.po, in directory where isnt somefile.po
3. Crash
TagsNo tags attached.
Fixed in Revisionr45035
LazTarget-
Widgetset
Attached Files

Activities

Vaclav Valicek

2014-05-14 10:04

reporter  

pochecker-master-po-format-patch.diff (586 bytes)   
diff --git components/pochecker/pocheckermain.pp components/pochecker/pocheckermain.pp
index b286791..b4354ff 100644
--- components/pochecker/pocheckermain.pp
+++ components/pochecker/pocheckermain.pp
@@ -247,9 +247,9 @@ begin
       end
       else if not FileExistsUtf8(FChosenMasterName) then
       begin
+        ShowError(Format(sCannotFindMaster,[ExtractFileName(FChosenMasterName), ShortFn]));
         FChosenMasterName := '';
         FChosenChildName := '';
-        ShowError(Format(sCannotFindMaster,[ShortFn]));
       end;
     end;
     OK := (FChosenMasterName <> '');

Bart Broersma

2014-05-14 12:16

developer   ~0074971

Thanks for reportig and the patch.
Please close if OK.

Vaclav Valicek

2014-05-14 13:20

reporter   ~0074976

Works!

Issue History

Date Modified Username Field Change
2014-05-14 10:04 Vaclav Valicek New Issue
2014-05-14 10:04 Vaclav Valicek File Added: pochecker-master-po-format-patch.diff
2014-05-14 12:02 Bart Broersma Assigned To => Bart Broersma
2014-05-14 12:02 Bart Broersma Status new => assigned
2014-05-14 12:16 Bart Broersma Fixed in Revision => r45035
2014-05-14 12:16 Bart Broersma LazTarget => -
2014-05-14 12:16 Bart Broersma Note Added: 0074971
2014-05-14 12:16 Bart Broersma Status assigned => resolved
2014-05-14 12:16 Bart Broersma Resolution open => fixed
2014-05-14 12:16 Bart Broersma Target Version => 1.2.4
2014-05-14 13:20 Vaclav Valicek Note Added: 0074976
2014-05-14 13:20 Vaclav Valicek Status resolved => closed