- Timestamp:
- 08/03/08 15:34:27 (16 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/common.c
r111 r116 29 29 const char* common_special_chars = ",\"\\"; 30 30 31 #define REGLOOKUP_VERSION " 1.0.0"31 #define REGLOOKUP_VERSION "0.9.0" 32 32 33 33 … … 357 357 /* XXX: Dont know what to do with these yet, just print as binary... */ 358 358 default: 359 /* XXX: It would be really nice if this message somehow included the 360 * name of the current value we're having trouble with, since 361 * stderr/stdout don't always sync nicely. 362 */ 359 363 fprintf(stderr, "WARNING: Unrecognized registry data type (0x%.8X); quoting as binary.\n", type); 360 364 -
trunk/src/reglookup-recover.c
r115 r116 148 148 * http://msdn2.microsoft.com/en-us/library/ms724872.aspx 149 149 */ 150 /* TODO: should probably do something different here for this tool.*/ 150 /* XXX: Should probably do something different here for this tool. 151 * Also, It would be really nice if this message somehow included the 152 * name of the current value we're having trouble with, since 153 * stderr/stdout don't always sync nicely. 154 */ 151 155 if(size > VK_MAX_DATA_LENGTH) 152 156 { … … 277 281 * Paths returned must be free()d. 278 282 */ 279 /* TODO: This is not terribly efficient, as it may reparse many keys280 * 281 * 283 /* XXX: This is not terribly efficient, as it may reparse many keys 284 * repeatedly. Should try to add caching. Also, piecing the path 285 * together is slow and redundant. 282 286 */ 283 287 char* getParentPath(REGF_FILE* f, REGF_NK_REC* nk) … … 425 429 rm_idx = range_list_find(rl, offset); 426 430 if(rm_idx < 0) 431 { 432 fprintf(stderr, "DEBUG: removeRange: rm_idx < 0; (%d)\n", rm_idx); 427 433 return false; 434 } 428 435 429 436 cur_elem = range_list_get(rl, rm_idx); 430 437 if(cur_elem == NULL) 431 438 { 432 printf("removeRange: cur_elem == NULL. rm_idx=%d\n", rm_idx);439 fprintf(stderr, "DEBUG: removeRange: cur_elem == NULL. rm_idx=%d\n", rm_idx); 433 440 return false; 434 441 } … … 438 445 if(!range_list_split_element(rl, rm_idx, offset)) 439 446 { 440 printf("removeRange: first split failed\n");447 fprintf(stderr, "DEBUG: removeRange: first split failed\n"); 441 448 return false; 442 449 } 443 450 rm_idx++; 451 cur_elem = range_list_get(rl, rm_idx); 452 if(cur_elem == NULL) 453 { 454 fprintf(stderr, 455 "DEBUG: removeRange: cur_elem == NULL after first split. rm_idx=%d\n", 456 rm_idx); 457 return false; 458 } 444 459 } 445 460 … … 448 463 if(!range_list_split_element(rl, rm_idx, offset+length)) 449 464 { 450 printf("removeRange: second split failed\n");465 fprintf(stderr, "DEBUG: removeRange: second split failed\n"); 451 466 return false; 452 467 } … … 455 470 if(!range_list_remove(rl, rm_idx)) 456 471 { 457 printf("removeRange: remove failed\n");472 fprintf(stderr, "DEBUG: removeRange: remove failed\n"); 458 473 return false; 459 474 } … … 487 502 return 20; 488 503 } 489 490 if(removeRange(unalloc_cells, key->offset, key->cell_size)) 491 { 492 /* TODO: This ugly hack is needed because unalloc_cells is changing 493 * underneath us when we find things. Need a better approach 494 * so we can parse things single-pass. 495 */ 496 i=0; 497 break; 498 } 499 else 500 return 30; 504 j+=key->cell_size-8; 501 505 } 502 506 } 507 } 508 509 for(i=0; i<range_list_size(unalloc_keys); i++) 510 { 511 cur_elem = range_list_get(unalloc_keys, i); 512 if(!removeRange(unalloc_cells, cur_elem->offset, cur_elem->length)) 513 return 30; 503 514 } 504 515 … … 743 754 REGF_NK_REC* tmp_key; 744 755 REGF_VK_REC* tmp_value; 745 uint32 argi, arge, i, j, k,ret, num_unalloc_keys;756 uint32 argi, arge, i, j, ret, num_unalloc_keys; 746 757 /* uint32 test_offset;*/ 747 758 -
trunk/src/reglookup.c
r111 r116 46 46 47 47 48 /* TODO: ahack to share some functions with reglookup-recover.c.49 * 48 /* XXX: A hack to share some functions with reglookup-recover.c. 49 * Should move these into a properly library at some point. 50 50 */ 51 51 #include "common.c"
Note: See TracChangeset
for help on using the changeset viewer.