Please sign in to comment.
Replace sprintf with defensive snprintf
* dyn_load.c (GC_register_dynamic_libraries): Replace sprintf with snprintf add put traling '\0' to buffer to prevent buffer overrun; cast snprintf result to void (to suppress compiler warning). * cord/tests/cordtest.c (test_printf): Likewise. * os_dep.c (GC_print_callers): Likewise. * os_dep.c (GC_dirty_init): Likewise (if PROC_VDB). * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Put trailing '\0' to buffer and cast snprintf result to void (Darwin).
- Loading branch information...
Showing with 21 additions and 10 deletions.