3898. [bug] To small a buffer in tohexstr() calls in test code.

[RT #36598]

(cherry picked from commit 6a6838f973)
This commit is contained in:
Mark Andrews
2014-07-22 11:28:09 +10:00
parent 2489675eed
commit c3763fc86e
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -1,3 +1,6 @@
3898. [bug] To small a buffer in tohexstr() calls in test code.
[RT #36598]
3894. [bug] Buffers in isc_print_vsnprintf were not properly
initialized leading to potential overflows when
printing out quad values. [RT #36505]
+2 -2
View File
@@ -39,7 +39,7 @@
unsigned char digest[ISC_SHA512_DIGESTLENGTH];
unsigned char buffer[1024];
const char *s;
char str[ISC_SHA512_DIGESTLENGTH];
char str[2 * ISC_SHA512_DIGESTLENGTH + 1];
unsigned char key[20];
int i = 0;
@@ -51,7 +51,7 @@ tohexstr(unsigned char *d, unsigned int len, char *out);
* Postcondition: A String representation of the given hexadecimal number is
* placed into the array *out
*
* 'out' MUST point to an array of at least len / 2 + 1
* 'out' MUST point to an array of at least len * 2 + 1
*
* Return values: ISC_R_SUCCESS if the operation is sucessful
*/