=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/openssl/apps.c,v retrieving revision 1.52 retrieving revision 1.53 diff -c -r1.52 -r1.53 *** src/usr.bin/openssl/apps.c 2019/06/28 13:35:02 1.52 --- src/usr.bin/openssl/apps.c 2019/07/03 03:24:02 1.53 *************** *** 1,4 **** ! /* $OpenBSD: apps.c,v 1.52 2019/06/28 13:35:02 deraadt Exp $ */ /* * Copyright (c) 2014 Joel Sing * --- 1,4 ---- ! /* $OpenBSD: apps.c,v 1.53 2019/07/03 03:24:02 deraadt Exp $ */ /* * Copyright (c) 2014 Joel Sing * *************** *** 1328,1334 **** else n = snprintf(serialpath, sizeof serialpath, "%s.%s", serialfile, suffix); ! if (n == -1 || n >= sizeof(serialpath)) { BIO_printf(bio_err, "serial too long\n"); goto err; } --- 1328,1334 ---- else n = snprintf(serialpath, sizeof serialpath, "%s.%s", serialfile, suffix); ! if (n < 0 || n >= sizeof(serialpath)) { BIO_printf(bio_err, "serial too long\n"); goto err; }