mirror of
https://gitlab.xiph.org/xiph/icecast-common.git
synced 2024-09-29 04:25:57 -04:00
Replaced usage of sprintf() with snprintf(). Also exported size of key printer's buffer in avl/.
svn path=/icecast/trunk/avl/; revision=18771
This commit is contained in:
parent
6a815a52d4
commit
9f9164c4b9
@ -1074,7 +1074,7 @@ static char balance_chars[3] = {'\\', '-', '/'};
|
|||||||
static int
|
static int
|
||||||
default_key_printer (char * buffer, void * key)
|
default_key_printer (char * buffer, void * key)
|
||||||
{
|
{
|
||||||
return sprintf (buffer, "%p", key);
|
return snprintf (buffer, AVL_KEY_PRINTER_BUFLEN, "%p", key);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1116,7 +1116,7 @@ print_node (avl_key_printer_fun_type key_printer,
|
|||||||
avl_node * node,
|
avl_node * node,
|
||||||
link_node * link)
|
link_node * link)
|
||||||
{
|
{
|
||||||
char buffer[256];
|
char buffer[AVL_KEY_PRINTER_BUFLEN];
|
||||||
unsigned int width;
|
unsigned int width;
|
||||||
width = key_printer (buffer, node->key);
|
width = key_printer (buffer, node->key);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user