format-security fixes

This commit is contained in:
Tom Callaway 2013-12-03 14:00:30 -05:00
parent 5ecbab7568
commit 670aa47ff8
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,21 @@
diff -up libsmi-0.4.8/tools/dump-tree.c.format-security libsmi-0.4.8/tools/dump-tree.c
--- libsmi-0.4.8/tools/dump-tree.c.format-security 2013-12-03 13:57:07.138165398 -0500
+++ libsmi-0.4.8/tools/dump-tree.c 2013-12-03 13:57:29.024137637 -0500
@@ -117,7 +117,7 @@ static void fprintIndex(FILE *f, SmiNode
smiElement; smiElement = smiGetNextElement(smiElement), i++) {
if (i > 0) fprintf(f, ",");
if (indexname) {
- fprintf(f, indexname);
+ fprintf(f, "%s", indexname);
}
indexname = smiGetElementNode(smiElement)->name;
}
@@ -143,7 +143,7 @@ static void fprintObjects(FILE *f, SmiNo
smiElement = smiGetNextElement(smiElement), i++) {
if (i > 0) fprintf(f, ",");
if (objectname) {
- fprintf(f, objectname);
+ fprintf(f, "%s", objectname);
}
objectname = smiGetElementNode(smiElement)->name;
}

View File

@ -12,6 +12,7 @@ Source2: IETF-MIB-LICENSE.txt
Patch0: libsmi-0.4.8-wget111.patch
Patch1: libsmi-0.4.8-CVE-2010-2891.patch
Patch2: libsmi-0.4.8-symbols-clash.patch
Patch3: libsmi-0.4.8-format-security-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libtool
@ -47,6 +48,7 @@ libsmi-based applications.
%patch0 -p1 -b .wget111
%patch1 -p1 -b .CVE-2010-2891
%patch2 -p1 -b .clash
%patch3 -p1 -b .format-security
cp %{SOURCE2} .
%build