@@ -179,7 +179,7 @@ void Pointer::RegisterToStringMethod(Local<Context> context, Local<Object> proto
179179 void * value = wrapper->Data ();
180180
181181 char buffer[100 ];
182- sprintf (buffer, " <Pointer: %p>" , value);
182+ snprintf (buffer, 100 , " <Pointer: %p>" , value);
183183
184184 Local<v8::String> result = tns::ToV8String (isolate, buffer);
185185 info.GetReturnValue ().Set (result);
@@ -200,7 +200,7 @@ void Pointer::RegisterToHexStringMethod(Local<Context> context, Local<Object> pr
200200 const void * value = wrapper->Data ();
201201
202202 char buffer[100 ];
203- sprintf (buffer, " %p" , value);
203+ snprintf (buffer, 100 , " %p" , value);
204204
205205 Local<v8::String> result = tns::ToV8String (isolate, buffer);
206206 info.GetReturnValue ().Set (result);
@@ -222,7 +222,7 @@ void Pointer::RegisterToDecimalStringMethod(Local<Context> context, Local<Object
222222 intptr_t ptr = static_cast <intptr_t >(reinterpret_cast <size_t >(value));
223223
224224 char buffer[100 ];
225- sprintf (buffer, " %ld" , ptr);
225+ snprintf (buffer, 100 , " %ld" , ptr);
226226
227227 Local<v8::String> result = tns::ToV8String (isolate, buffer);
228228 info.GetReturnValue ().Set (result);
0 commit comments