1
0
forked from pool/virtualbox
virtualbox/virtualbox-snpritnf-buffer-overflow.patch
Tomáš Chvátal 756ec3ce82 - Fix buffer overflow on dtrace lib:
* virtualbox-snpritnf-buffer-overflow.patch
- Note: still does not respect cxxflags

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=212
2015-07-14 19:14:21 +00:00

17 lines
781 B
Diff

diff -urN VirtualBox-5.0.0.old/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_printf.c VirtualBox-5.0.0/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_printf.c
--- VirtualBox-5.0.0.old/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_printf.c 2015-07-14 20:53:12.121479325 +0200
+++ VirtualBox-5.0.0/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_printf.c 2015-07-14 21:04:02.001865414 +0200
@@ -1568,10 +1568,10 @@
width = 0;
if (width != 0)
- f += snprintf(f, sizeof (format), "%d", ABS(width));
+ f += snprintf(f, sizeof (f), "%d", ABS(width));
if (prec > 0)
- f += snprintf(f, sizeof (format), ".%d", prec);
+ f += snprintf(f, sizeof (f), ".%d", prec);
(void) strcpy(f, pfd->pfd_fmt);
pfd->pfd_rec = rec;