View Issue Details

IDProjectCategoryView StatusLast Update
0006660JEDI Code LibraryJclPEImagepublic2019-04-17 07:23
ReporterdenreqAssigned Tojfudickar 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionVersion 2.5 (Subversion repository/Daily zips) 
Target VersionFixed in Version 
Summary0006660: EIntOverflow
DescriptionNameCount is currently declared as dword in
procedure TJclPeExportFuncList.CreateList;

When NameCount comes to 0, there is an error at line 2410 :

"for I := 0 to NameCount - 1 do"

NameCount - 1 raises an Int Overlow exception.

Solution for me : to declare NameCount as integer instead of dword, or
change line to

"for I := 0 to integer(NameCount) - 1 do"

TagsNo tags attached.
Fixed in GIT commit
Fixed in SVN revision
IDE versionAll

Activities

mh

2019-03-03 09:24

reporter   ~0021610

A different approach to fixing it would be to have an if before the loop like this:

if (NameCount > 0) then
  for I := 0 to NameCount - 1 do

This would avoid the type cast. Question influencing the deccission is: is it likely for NameCount to contain values > 2^31?

mh

2019-04-13 09:36

reporter   ~0021658

I issued this pull request containing my proposed fix:
https://github.com/project-jedi/jcl/pull/45

jfudickar

2019-04-17 07:23

developer   ~0021715

Fixed

Issue History

Date Modified Username Field Change
2019-01-24 08:51 denreq New Issue
2019-01-24 08:51 denreq IDE version => All
2019-03-03 09:24 mh Note Added: 0021610
2019-04-13 09:36 mh Note Added: 0021658
2019-04-17 07:23 jfudickar Note Added: 0021715
2019-04-17 07:23 jfudickar Status new => resolved
2019-04-17 07:23 jfudickar Resolution open => fixed
2019-04-17 07:23 jfudickar Assigned To => jfudickar