=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/openssl/s_time.c,v retrieving revision 1.29 retrieving revision 1.30 diff -c -r1.29 -r1.30 *** src/usr.bin/openssl/s_time.c 2018/08/22 20:36:24 1.29 --- src/usr.bin/openssl/s_time.c 2018/08/28 02:14:22 1.30 *************** *** 1,4 **** ! /* $OpenBSD: s_time.c,v 1.29 2018/08/22 20:36:24 cheloha Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * --- 1,4 ---- ! /* $OpenBSD: s_time.c,v 1.30 2018/08/28 02:14:22 cheloha Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * *************** *** 376,386 **** if (s_time_config.www_path != NULL) { retval = snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n", s_time_config.www_path); ! if ((size_t)retval >= sizeof buf) { fprintf(stderr, "URL too long\n"); return 0; } ! SSL_write(scon, buf, strlen(buf)); while ((i = SSL_read(scon, buf, sizeof(buf))) > 0) bytes_read += i; } --- 376,387 ---- if (s_time_config.www_path != NULL) { retval = snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n", s_time_config.www_path); ! if (retval == -1 || retval >= sizeof buf) { fprintf(stderr, "URL too long\n"); return 0; } ! if (SSL_write(scon, buf, retval) != retval) ! return 0; while ((i = SSL_read(scon, buf, sizeof(buf))) > 0) bytes_read += i; }