Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005180 [JEDI VCL] 00 JVCL Components minor always 2010-02-24 17:16 2011-06-10 16:09
Reporter jkelley View Status public  
Assigned To AHUser
Priority normal Resolution fixed  
Status resolved   Product Version 3.39
Summary 0005180: TJvAppRegistryStorage.ReadDateTime is not very robust
Description If configured to store DateTime values as strings, then ReadDateTime will fall back to reading a float value if converting the string value to a DateTime fails. However, from what I can tell in testing, TJvAppRegistryStorage.DoReadFloat will successfully read from a string registry entry as long as the string is no more than 4 characters in size.

As a result, TJvAppRegistryStorage.ReadDateTime will read corrupted or truncated string-formatted DateTime values, returning incorrect results, as long as the values are no more than 4 characters long.
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
jfudickar (developer)
2010-02-24 21:54

Did you have a better suggestion?
jkelley (reporter)
2010-02-24 22:12

It would make sense to me for TJvAppRegistryStorage.DoReadFloat to require that the registry value be a REG_BINARY that's exactly SizeOf(Extended) bytes long.

That's the format created by TJvAppRegistryStorage.DoWriteFloat, so it should be safe.

I'm really not familiar with TJvAppRegistryStorage - I came across this issue with ReadDateTime while trying to diagnose an error being raised by TJvProgramVersionCheck, which uses TJvAppStorage - so this suggestion may have problems that I'm not aware of.
obones (administrator)
2010-03-09 11:03

Having the zipped sources of a sample application showing this would help greatly
AHUser (developer)
2010-04-02 14:23

Fixed in SVN. DoReadFloat now only accepts REG_BINARY as datatype

- Issue History
Date Modified Username Field Change
2010-02-24 17:16 jkelley New Issue
2010-02-24 21:54 jfudickar Note Added: 0017216
2010-02-24 22:12 jkelley Note Added: 0017217
2010-03-09 11:03 obones Note Added: 0017271
2010-03-09 11:03 obones Status new => feedback
2010-04-02 14:23 AHUser Note Added: 0017351
2010-04-02 14:23 AHUser Status feedback => resolved
2010-04-02 14:23 AHUser Fixed in Version => Daily / SVN
2010-04-02 14:23 AHUser Resolution open => fixed
2010-04-02 14:23 AHUser Assigned To => AHUser
2011-06-10 16:09 obones Fixed in Version Daily / SVN => 3.40

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker