Skip to content

Commit 115507e

Browse files
committed
coverity: null check.
1 parent d6fe15a commit 115507e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ssl_asn1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ static int wolfssl_i2d_asn1_items(const void* obj, byte* buf,
282282
len = 0;
283283
break;
284284
}
285-
if (buf != NULL && !mem->ex && mem->tag >= 0) {
285+
if (buf != NULL && tmp != NULL && !mem->ex && mem->tag >= 0) {
286286
/* Encode the implicit tag */
287287
byte imp[ASN_TAG_SZ + MAX_LENGTH_SZ];
288288
SetImplicit(tmp[0], mem->tag, 0, imp, 0);

0 commit comments

Comments
 (0)