summaryrefslogtreecommitdiff
path: root/lib/parser_aux.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2014-05-17 08:08:15 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2014-05-17 08:08:15 +0200
commit07a5adb87880f3fce80aa12121409bbf652f1b6d (patch)
tree8b8f7a43948a7555a7aac8c35a2aade727b492aa /lib/parser_aux.h
parent3d6a02f19ff15a38dae9686033e37499b3968256 (diff)
downloadlibtasn1-07a5adb87880f3fce80aa12121409bbf652f1b6d.tar.gz
made _asn1_ltostr() safer.
Diffstat (limited to 'lib/parser_aux.h')
-rw-r--r--lib/parser_aux.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/parser_aux.h b/lib/parser_aux.h
index ee01725..8ef105b 100644
--- a/lib/parser_aux.h
+++ b/lib/parser_aux.h
@@ -27,9 +27,9 @@
/***************************************/
inline static char *
-_asn1_ltostr (long v, char *str)
+_asn1_ltostr (long v, char *str, size_t str_size)
{
- sprintf(str, "%ld", v);
+ snprintf(str, str_size, "%ld", v);
return str;
}
@@ -60,8 +60,6 @@ void _asn1_delete_list (void);
void _asn1_delete_list_and_nodes (void);
-char *_asn1_ltostr (long v, char *str);
-
asn1_node _asn1_find_up (asn1_node node);
int _asn1_change_integer_value (asn1_node node);