summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Remove no longer used internal function utf16_string_len_in_bytes.Richard W.M. Jones2011-04-131-16/+2
|
* hivex_value_multiple_strings: Don't read uninitialized data.Richard W.M. Jones2011-04-131-1/+2
| | | | | | | | | If hivex_value_multiple_strings was given a value which had an odd length or if the data in the value was unterminated, hivex_value_multiple_strings could read uninitialized data. Potentially (although very unlikely) this could cause a non-exploitable segfault in the calling program.
* Handle odd-length "UTF16" strings.Richard W.M. Jones2011-04-131-1/+1
| | | | | If the length of the buffer is not even, then this would read a byte of uninitialized data. Fix the length check to avoid this.
* Return real length of buffer from hivex_value_value.Richard W.M. Jones2011-04-131-0/+4
| | | | | | | | | | | | | | | | | In real registries, often the length declared in the header does not match the length of the block. In this case hivex_value_value would only allocate a value with a size which is the shorter of the two length values, which is correct and safe. However user code could do: buf = hivex_value_value (h, v, &t, &len); memcpy (somewhere, buf, len); which would copy uninitialized data. If hivex_value_value truncates a value like this, we also need to return the shorter length to the user as well.
* Really fix the case where a UTF-16 string contains junk after the string.Richard W.M. Jones2011-04-131-1/+1
| | | | | | The previous commit b71b88f588f8660935a7d462e97b84aa2d669249 attempted to fix this, but got the test the wrong way round so the length would never be shorter.
* Fix use-after-free in hivex_close.Richard W.M. Jones2011-04-121-3/+3
| | | | Found using valgrind.
* Add debug output to hivex_close.Matthew Booth2010-08-131-0/+3
|
* Don't try to process junk after a string value as UTF-16.Richard Jones2010-07-121-0/+31
| | | | | Thanks to Hilko Bengen for characterizing the issue and providing an initial version of this patch.
* Call iconv_close along error path out of function.Hilko Bengen2010-07-121-1/+5
|
* Add hivex_set_value API call, and ocaml and perl bindings, and tests.Conrad Meyer2010-07-081-0/+80
|
* Add a linker script to limit visibility to exported symbols.Richard Jones2010-04-031-3/+9
|
* Add CLEANFILES rules.TJ2010-04-021-0/+2
|
* Zero all new block allocations.Richard Jones2010-03-291-0/+2
| | | | | | | | | | Make sure all new block allocations (from allocate_block) are zeroed. It can happen that junk from previous hive pages can end up in new block allocations, if the hive previously shrank. (Thanks to Marko Myllynen for finding an example where this happened).
* Increase HIVEX_MAX_VALUES from 1000 to 10000.Richard Jones2010-03-291-1/+1
| | | | | I was sent a genuine Windows XP hive by Marko Myllynen which had a key with > 1000 values attached.
* Increase HIVEX_MAX_SUBKEYS to 15000.Richard Jones2010-03-261-1/+1
| | | | | | Windows 7 registry has a hive key which contains 11908 subkeys, larger than the existing limit (10000). The key is: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Winners
* hivex: Add debugging message when returning ERANGE error.Richard Jones2010-03-261-0/+9
|
* Create separate toplevel directories for hivexsh and hivexml.Richard Jones2010-02-2413-2371/+3
|
* Rename hivex/ -> lib/Richard Jones2010-02-2425-0/+7068