Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e600d8f

Browse files
committed
Merge pull request #4086 from tacaswell/cve_patch
BUG : fix security bug reported via debian by Matt Giuca
2 parents 3486a67 + 5aac964 commit e600d8f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ matrix:
2121
env: BUILD_DOCS=true
2222

2323
install:
24-
- pip install -q --use-mirrors nose python-dateutil numpy pep8 pyparsing pillow
24+
- pip install -q --use-mirrors nose python-dateutil numpy pep8==1.5.7 pyparsing pillow
2525
- sudo apt-get update && sudo apt-get -qq install inkscape libav-tools mencoder
2626
# We use --no-install-recommends to avoid pulling in additional large latex docs that we don't need
2727
- if [[ $BUILD_DOCS == true ]]; then sudo apt-get install -qq --no-install-recommends dvipng texlive-latex-base texlive-latex-extra texlive-fonts-recommended graphviz; fi

src/mplutils.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ Printf::Printf(const char *fmt, ...)
1818
{
1919
va_list ap;
2020
va_start(ap, fmt);
21-
vsprintf(buffer, fmt, ap);
21+
vsnprintf(buffer, 1024, fmt, ap);
22+
// Null-terminate the string. Non-standard C implementations (e.g.,
23+
// Microsoft Visual C++) do not do this automatically.
24+
buffer[1023] = '\0';
2225
va_end(ap); // look ma - I rememberd it this time
2326
}
2427

0 commit comments

Comments
 (0)