summaryrefslogtreecommitdiff
path: root/src/plain_packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plain_packet.c')
-rw-r--r--src/plain_packet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plain_packet.c b/src/plain_packet.c
index 6eca0af..8b63e4a 100644
--- a/src/plain_packet.c
+++ b/src/plain_packet.c
@@ -83,7 +83,7 @@ void plain_packet_set_length(plain_packet_t* packet, u_int32_t len)
u_int8_t* plain_packet_get_payload(plain_packet_t* packet)
{
- if(!packet)
+ if(!packet || !packet->payload_length_)
return NULL;
return (packet->data_.buf_ + sizeof(payload_type_t));