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


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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #76, comment 10

    v5 v6  
    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.
    77Another 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.
     8
     9You are also incorrectly returning when ERROR_EAS_DIDN_FIT. Since cbList is "very big" you need to do a special KernCopyOut:
     10
     11{{{
     12   if (ulFeaSize > ulMaxSize)
     13      {
     14      /* this is what HPFS.IFS returns */
     15      /* when a file does not have any EAs */
     16      pTarFeal->cbList = 0xEF;
     17      KernCopyOut(peaop->fpFEAList,pTarFeal,sizeof(pTarFeal->cbList));
     18      rc = ERROR_EAS_DIDNT_FIT;
     19      }
     20}}}
     21move the following KernCopyOut into the "else" branch.
     22