Changeset 72 for trunk/src


Ignore:
Timestamp:
07/30/06 16:09:07 (18 years ago)
Author:
tim
Message:

Added QWORD type support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/reglookup.c

    r71 r72  
    241241
    242242  case REG_DWORD:
    243     ascii_max = sizeof(char)*11;
     243    ascii_max = sizeof(char)*(8+2+1);
    244244    ascii = malloc(ascii_max);
    245245    if(ascii == NULL)
     
    252252
    253253  case REG_DWORD_BE:
    254     ascii_max = sizeof(char)*11;
     254    ascii_max = sizeof(char)*(8+2+1);
    255255    ascii = malloc(ascii_max);
    256256    if(ascii == NULL)
     
    261261    return ascii;
    262262    break;
     263
     264  case REG_QWORD:
     265    ascii_max = sizeof(char)*(16+2+1);
     266    ascii = malloc(ascii_max);
     267    if(ascii == NULL)
     268      return NULL;
     269
     270    snprintf(ascii, ascii_max, "0x%.2X%.2X%.2X%.2X%.2X%.2X%.2X%.2X",
     271             datap[7], datap[6], datap[5], datap[4],
     272             datap[3], datap[2], datap[1], datap[0]);
     273    return ascii;
     274    break;
     275   
    263276
    264277  /* XXX: this MULTI_SZ parser is pretty inefficient.  Should be
Note: See TracChangeset for help on using the changeset viewer.