Changeset 207e288 for lib


Ignore:
Timestamp:
03/01/18 15:39:08 (3 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
cachetimestamps, develop, etsilive, master, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
Children:
02d13cb
Parents:
0e8f8cb
Message:

Fix broken ERF extension header detection.

We'd detect the first one correctly, but fail to recognise
any subsequent ones.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_erf.c

    ra857389 r207e288  
    167167        dag_record_t *erfptr = NULL;
    168168        uint64_t *exthdr = NULL;
    169        
     169        uint8_t *firstbyte;
     170
    170171        erfptr = (dag_record_t *)packet->header;
    171172        if ((erfptr->type & 0x80) == 0x80) {
     
    174175                extsize += 8;
    175176
    176                 while (*exthdr < (1UL << 31)) {
     177                firstbyte = (uint8_t *)exthdr;
     178                while ((*firstbyte & 0x80) == 0x80) {
    177179                        extsize += 8;
    178180                        exthdr ++;
     181                        firstbyte = (uint8_t *)exthdr;
    179182                        assert(extsize <= ntohs(erfptr->rlen));
    180183                }
    181184        }
    182        
    183 
    184185        return dag_record_size + extsize + erf_get_padding(packet);
    185186}
     
    449450       
    450451        dag_record_t *erfptr;
    451        
     452
    452453        if (packet->buffer != buffer &&
    453454                packet->buf_control == TRACE_CTRL_PACKET) {
Note: See TracChangeset for help on using the changeset viewer.