Changeset 257 for trunk/lib


Ignore:
Timestamp:
06/16/11 20:13:13 (13 years ago)
Author:
tim
Message:

documentation fixes/additions

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/regfi.c

    r256 r257  
    19971997  cur_key = regfi_iterator_cur_key(i);
    19981998  if(cur_key == NULL)
    1999     /* XXX: report error */
     1999    regfi_log_add(REGFI_LOG_ERROR, "Current key invalid in find_subkey.");
    20002000    return ret_val;
    20012001
     
    21002100  cur_key = regfi_iterator_cur_key(i);
    21012101  if(cur_key == NULL)
    2102     /* XXX: report error */
     2102    regfi_log_add(REGFI_LOG_ERROR, "Current key invalid in cur_subkey.");
    21032103    return NULL;
    21042104
     
    21292129  cur_key = regfi_iterator_cur_key(i);
    21302130  if(cur_key == NULL)
    2131     /* XXX: report error */
     2131    regfi_log_add(REGFI_LOG_ERROR, "Current key invalid in find_value.");
    21322132    return ret_val;
    21332133
     
    21612161  cur_key = regfi_iterator_cur_key(i);
    21622162  if(cur_key == NULL)
    2163     /* XXX: report error */
     2163    regfi_log_add(REGFI_LOG_ERROR, "Current key invalid in cur_value.");
    21642164    return ret_val;
    21652165
     
    25232523    }
    25242524
    2525     /* XXX: check for NULL */
    25262525    tmp_str = talloc_realloc(NULL, tmp_str, uint8_t, tmp_size);
     2526    if(tmp_str == NULL)
     2527      return false;
    25272528    data->interpreted.string = tmp_str;
    25282529    data->interpreted_size = tmp_size;
     
    27702771  memcpy(ret_val->file_name, file_header+0x30,  REGFI_REGF_NAME_SIZE);
    27712772
    2772   /* XXX: Should we add a warning if these uuid parsers fail?  Can they? */
    27732773  ret_val->rm_id = winsec_parse_uuid(ret_val, file_header+0x70, 16);
     2774  if(ret_val->rm_id == NULL)
     2775    regfi_log_add(REGFI_LOG_WARN, "Hive header's rm_id failed to parse.");
     2776
    27742777  ret_val->log_id = winsec_parse_uuid(ret_val, file_header+0x80, 16);
     2778  if(ret_val->log_id == NULL)
     2779    regfi_log_add(REGFI_LOG_WARN, "Hive header's log_id failed to parse.");
     2780
    27752781  ret_val->flags = IVAL(file_header, 0x90);
     2782
    27762783  ret_val->tm_id = winsec_parse_uuid(ret_val, file_header+0x94, 16);
     2784  if(ret_val->tm_id == NULL)
     2785    regfi_log_add(REGFI_LOG_WARN, "Hive header's tm_id failed to parse.");
     2786
    27772787  ret_val->guid_signature = IVAL(file_header, 0xa4);
    27782788
     
    34863496
    34873497  /* XXX: do something with unalloc? */
    3488 
    34893498  max_size = regfi_calc_maxsize(file, offset);
    34903499  if((max_size < 0) || (num_chunks*sizeof(uint32_t) + 4 > max_size))
  • trunk/lib/winsec.c

    r253 r257  
    6262  ret_val->control = SVAL(buf, 0x2);
    6363
     64  /* XXX: should probably reject any non-self relative */
    6465  if(!(ret_val->control & WINSEC_DESC_SELF_RELATIVE))
    6566    fprintf(stderr, "DEBUG: NOT self-relative!\n");
Note: See TracChangeset for help on using the changeset viewer.