diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/opencdk/read-packet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/opencdk/read-packet.c b/lib/opencdk/read-packet.c index 313e779b35..03395b3335 100644 --- a/lib/opencdk/read-packet.c +++ b/lib/opencdk/read-packet.c @@ -527,7 +527,7 @@ read_attribute (cdk_stream_t inp, size_t pktlen, cdk_pkt_userid_t attr) p++; len--; - if (pktlen - (len + 1) > 0) + if (len >= pktlen) return CDK_Inv_Packet; attr->attrib_img = cdk_calloc (1, len); if (!attr->attrib_img) |