diff options
author | Ahto Truu <ahto.truu@guardtime.com> | 2013-08-28 12:18:16 +0300 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-09-02 14:55:01 +0200 |
commit | 97f096e351b420c1d845c91c578c88eac6e6af72 (patch) | |
tree | 22bf06cee23bfe1f452e9785692706ba6d32f3d9 /runtime/librsgt_read.c | |
parent | a5abbddb5c04b95a6e51a93f71516cee280c54c4 (diff) | |
download | rsyslog-97f096e351b420c1d845c91c578c88eac6e6af72.tar.gz rsyslog-97f096e351b420c1d845c91c578c88eac6e6af72.tar.bz2 rsyslog-97f096e351b420c1d845c91c578c88eac6e6af72.zip |
More careful TLV encoding/decoding
Diffstat (limited to 'runtime/librsgt_read.c')
-rw-r--r-- | runtime/librsgt_read.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/librsgt_read.c b/runtime/librsgt_read.c index a6e33160..a9a50798 100644 --- a/runtime/librsgt_read.c +++ b/runtime/librsgt_read.c @@ -249,7 +249,7 @@ rsgt_tlvRecRead(FILE *fp, tlvrecord_t *rec) NEXTC; rec->hdr[0] = c; rec->tlvtype = c & 0x1f; - if(c & 0x80) { /* tlv16? */ + if(c & RSGT_FLAG_TLV16) { /* tlv16? */ rec->lenHdr = 4; NEXTC; rec->hdr[1] = c; @@ -290,7 +290,7 @@ rsgt_tlvDecodeSUBREC(tlvrecord_t *rec, uint16_t *stridx, tlvrecord_t *newrec) c = rec->data[(*stridx)++]; newrec->hdr[0] = c; newrec->tlvtype = c & 0x1f; - if(c & 0x80) { /* tlv16? */ + if(c & RSGT_FLAG_TLV16) { /* tlv16? */ newrec->lenHdr = 4; if(rec->tlvlen == *stridx) {r=RSGTE_LEN; goto done;} c = rec->data[(*stridx)++]; |