summaryrefslogtreecommitdiffstats
path: root/runtime/librsgt_read.c
diff options
context:
space:
mode:
authorAhto Truu <ahto.truu@guardtime.com>2013-08-28 12:18:16 +0300
committerRainer Gerhards <rgerhards@adiscon.com>2013-09-02 14:55:01 +0200
commit97f096e351b420c1d845c91c578c88eac6e6af72 (patch)
tree22bf06cee23bfe1f452e9785692706ba6d32f3d9 /runtime/librsgt_read.c
parenta5abbddb5c04b95a6e51a93f71516cee280c54c4 (diff)
downloadrsyslog-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.c4
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)++];