{
uint8_t *head = BPTR(buf);
uint8_t *tail = BEND(buf);
- ASSERT(buf_safe(buf, 1));
+ if ( !(buf_safe(buf, 1)) )
+ {
+ return;
+ }
++buf->len;
/* move head byte of payload to tail */
}
/* Header is 0x50 */
- ASSERT(buf_prepend(buf, 2));
+ if ( !(buf_prepend(buf, 2)) )
+ {
+ return;
+ }
head = BPTR(buf);
head[0] = COMP_ALGV2_INDICATOR_BYTE;
{
uint8_t *head = BPTR(buf);
uint8_t *tail = BEND(buf);
- ASSERT(buf_safe(buf, 1));
+ if ( !(buf_safe(buf, 1)) )
+ {
+ return;
+ }
++buf->len;
/* move head byte of payload to tail */
else
{
uint8_t *header = buf_prepend(buf, 1);
- *header = NO_COMPRESS_BYTE;
+ if (header)
+ {
+ *header = NO_COMPRESS_BYTE;
+ }
}
}
else
{
uint8_t *header = buf_prepend(buf, 1);
- *header = NO_COMPRESS_BYTE;
+ if (header)
+ {
+ *header = NO_COMPRESS_BYTE;
+ }
}
}