Changeset 165 for trunk/lib


Ignore:
Timestamp:
12/11/09 22:13:27 (15 years ago)
Author:
tim
Message:

added misc comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/regfi.c

    r162 r165  
    988988    return NULL;
    989989
     990  /* XXX: Registry value names are supposedly limited to 16383 characters
     991   *      according to:
     992   *      http://msdn.microsoft.com/en-us/library/ms724872%28VS.85%29.aspx
     993   *      Might want to emit a warning if this is exceeded. 
     994   *      It is expected that "characters" could be variable width.
     995   *      Also, it may be useful to use this information to limit false positives
     996   *      when recovering deleted VK records.
     997   */
     998
    990999  from_encoding = (ret_val->flags & REGFI_VK_FLAG_ASCIINAME)
    9911000    ? REGFI_ENCODING_ASCII : REGFI_ENCODING_UTF16LE;
     
    10761085  }
    10771086
     1087  /* XXX: Registry key names are supposedly limited to 255 characters according to:
     1088   *      http://msdn.microsoft.com/en-us/library/ms724872%28VS.85%29.aspx
     1089   *      Might want to emit a warning if this is exceeded. 
     1090   *      It is expected that "characters" could be variable width.
     1091   *      Also, it may be useful to use this information to limit false positives
     1092   *      when recovering deleted NK records.
     1093   */
    10781094  from_encoding = (nk->flags & REGFI_NK_FLAG_ASCIINAME)
    10791095    ? REGFI_ENCODING_ASCII : REGFI_ENCODING_UTF16LE;
     
    26062622 
    26072623  /* Microsoft's documentation indicates that "available memory" is
    2608    * the limit on value sizes.  Annoying.  We limit it to 1M which
    2609    * should rarely be exceeded, unless the file is corrupt or
    2610    * malicious. For more info, see:
    2611    *   http://msdn2.microsoft.com/en-us/library/ms724872.aspx
     2624   * the limit on value sizes for the more recent registry format version.
     2625   * This is not only annoying, but it's probably also incorrect, since clearly
     2626   * value data sizes are limited to 2^31 (high bit used as a flag) and even
     2627   * with big data records, the apparent max size is:
     2628   *   16344 * 2^16 = 1071104040 (~1GB).
     2629   *
     2630   * We choose to limit it to 1M which was the limit in older versions and
     2631   * should rarely be exceeded unless the file is corrupt or malicious.
     2632   * For more info, see:
     2633   *   http://msdn.microsoft.com/en-us/library/ms724872%28VS.85%29.aspx
    26122634   */
    26132635  /* XXX: add way to skip this check at user discression. */
Note: See TracChangeset for help on using the changeset viewer.