Commit 87f5cd065c27148d983401f43f56d9432a2034ad

Timothy Gu 2015-03-11T19:48:56

Use more secure sprintf_s()

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/dlfcn.c b/dlfcn.c
index 3f5032d..46c85ce 100644
--- a/dlfcn.c
+++ b/dlfcn.c
@@ -162,7 +162,7 @@ static void save_err_ptr_str( const void *ptr )
 {
     char ptr_buf[19]; /* 0x<pointer> up to 64 bits. */
 
-    sprintf( ptr_buf, "0x%p", ptr );
+    sprintf_s( ptr_buf, 19, "0x%p", ptr );
 
     save_err_str( ptr_buf );
 }