eck_prn.c (302408) | eck_prn.c (325335) |
---|---|
1/* crypto/ec/eck_prn.c */ 2/* 3 * Written by Nils Larsch for the OpenSSL project. 4 */ 5/* ==================================================================== 6 * Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 328 unchanged lines hidden (view full) --- 337 OPENSSL_free(buffer); 338 return (ret); 339} 340 341static int print_bin(BIO *fp, const char *name, const unsigned char *buf, 342 size_t len, int off) 343{ 344 size_t i; | 1/* crypto/ec/eck_prn.c */ 2/* 3 * Written by Nils Larsch for the OpenSSL project. 4 */ 5/* ==================================================================== 6 * Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 328 unchanged lines hidden (view full) --- 337 OPENSSL_free(buffer); 338 return (ret); 339} 340 341static int print_bin(BIO *fp, const char *name, const unsigned char *buf, 342 size_t len, int off) 343{ 344 size_t i; |
345 char str[128]; | 345 char str[128 + 1 + 4]; |
346 347 if (buf == NULL) 348 return 1; 349 if (off > 0) { 350 if (off > 128) 351 off = 128; 352 memset(str, ' ', off); 353 if (BIO_write(fp, str, off) <= 0) --- 24 unchanged lines hidden --- | 346 347 if (buf == NULL) 348 return 1; 349 if (off > 0) { 350 if (off > 128) 351 off = 128; 352 memset(str, ' ', off); 353 if (BIO_write(fp, str, off) <= 0) --- 24 unchanged lines hidden --- |