|Anonymous | Login | Signup for a new account||2019-04-26 04:49 CEST|
|Main | My View | View Issues | Change Log | Roadmap | Docs|
|Viewing Issue Simple Details|
|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|
|Summary||0005180: TJvAppRegistryStorage.ReadDateTime is not very robust|
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.
|Tags||No tags attached.|
|Did you have a better suggestion?|
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.
|Having the zipped sources of a sample application showing this would help greatly|
|Fixed in SVN. DoReadFloat now only accepts REG_BINARY as datatype|
|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|