Changes between Version 6 and Version 7 of Ticket #76, comment 10


Ignore:
Timestamp:
Feb 2, 2020, 4:35:01 PM (5 years ago)
Author:
erdmann

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #76, comment 10

    v6 v7  
    55Once this is all done you can generate FEAlist and use KernCopyOut to copy your populated FEAList to the original address in user space. You can then even conveniently take the length value that you summed up in your GEA checking loop.
    66By the way: there is no need to copy anything from the FEAList. It is output only. You just need the pointer to this list to populate it.
    7 Another by the way: you already have the summing up loop in your code. The result that is interesting to you is ulFeaSize. And only if you do NOT return with ERROR_EAS_DIDNT_FIT will you allocate the FEAList buffer and use it.
     7Another by the way: you already have the summing up loop in your code. The result that is interesting to you is ulFeaSize. And only if you do NOT return with ERROR_EAS_DIDNT_FIT will you allocate the FEAList buffer of this length and use it.
    88
    99You are also incorrectly returning when ERROR_EAS_DIDN_FIT. Since cbList is "very big" you need to do a special KernCopyOut:
     
    1414      /* this is what HPFS.IFS returns */
    1515      /* when a file does not have any EAs */
    16       pTarFeal->cbList = 0xEF;
    17       KernCopyOut(peaop->fpFEAList,pTarFeal,sizeof(pTarFeal->cbList));
     16      ULONG cbList = 0xEF;
     17      KernCopyOut(peaop->fpFEAList,&cbList,sizeof(cbList));
    1818      rc = ERROR_EAS_DIDNT_FIT;
    1919      }