- Timestamp:
- 08/15/08 21:21:54 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/regfi.c
r124 r125 1583 1583 ret_val->values_off = IVAL(nk_header, 0x28); 1584 1584 ret_val->sk_off = IVAL(nk_header, 0x2C); 1585 /* XXX: currently we do nothing with class names. Need to investigate. */1586 1585 ret_val->classname_off = IVAL(nk_header, 0x30); 1587 1586 … … 1594 1593 ret_val->name_length = SVAL(nk_header, 0x48); 1595 1594 ret_val->classname_length = SVAL(nk_header, 0x4A); 1595 1596 1596 1597 1597 if(ret_val->name_length + REGFI_NK_MIN_LENGTH > ret_val->cell_size) … … 1634 1634 } 1635 1635 ret_val->keyname[ret_val->name_length] = '\0'; 1636 1637 1638 /***/ 1639 1640 if(ret_val->classname_length > 0 1641 && ret_val->classname_off != REGF_OFFSET_NONE 1642 && ret_val->classname_off == (ret_val->classname_off & 0xFFFFFFF8)) 1643 { 1644 ret_val->classname = (char*)zalloc(ret_val->classname_length+1); 1645 if(ret_val->classname != NULL) 1646 { 1647 if(!regfi_parse_cell(file->fd, ret_val->classname_off+REGF_BLOCKSIZE, 1648 (uint8*)ret_val->classname, ret_val->classname_length, 1649 &cell_length, &unalloc) 1650 || (cell_length < ret_val->classname_length) 1651 || (strict && unalloc)) 1652 { 1653 /* Being careful not to reject the whole key here even when 1654 * strict and things are obviously wrong, since it appears 1655 * they're commonly obviously wrong. 1656 */ 1657 free(ret_val->classname); 1658 ret_val->classname = NULL; 1659 return ret_val; 1660 } 1661 1662 ret_val->classname[ret_val->classname_length] = '\0'; 1663 /*printf("==> cell_length=%d, classname_length=%d, max_bytes_subkeyclassname=%d\n", cell_length, ret_val->classname_length, ret_val->max_bytes_subkeyclassname);*/ 1664 } 1665 } 1666 /***/ 1667 1636 1668 1637 1669 return ret_val;
Note: See TracChangeset
for help on using the changeset viewer.