Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff -up openmx3.8/source/Force_test.c.format-security openmx3.8/source/Force_test.c
--- openmx3.8/source/Force_test.c.format-security 2016-03-27 08:53:28.000000000 +0200
+++ openmx3.8/source/Force_test.c 2016-04-18 00:30:48.115479894 +0200
@@ -198,13 +198,13 @@ void Force_test(int argc, char *argv[])
strcpy(tmp_argv,argv[3]);
tp = strtok(tmp_argv," ");
- sprintf(str[0],tp);
+ sprintf(str[0],"%s",tp);
p = 1;
while (tp != NULL ){
tp = strtok(NULL," ");
if (tp!=NULL){
- sprintf(str[p],tp);
+ sprintf(str[p],"%s",tp);
p++;
}
}
diff -up openmx3.8/source/Memory_Leak_test.c.format-security openmx3.8/source/Memory_Leak_test.c
--- openmx3.8/source/Memory_Leak_test.c.format-security 2016-03-27 08:53:28.000000000 +0200
+++ openmx3.8/source/Memory_Leak_test.c 2016-04-18 00:25:58.960676979 +0200
@@ -122,13 +122,13 @@ void Memory_Leak_test(int argc, char *ar
strcpy(tmp_argv,argv[2]);
tp = strtok(tmp_argv," ");
- sprintf(str[0],tp);
+ sprintf(str[0],"%s",tp);
p = 1;
while (tp != NULL ){
tp = strtok(NULL," ");
if (tp!=NULL){
- sprintf(str[p],tp);
+ sprintf(str[p],"%s",tp);
p++;
}
}
diff -up openmx3.8/source/Stress_test.c.format-security openmx3.8/source/Stress_test.c
--- openmx3.8/source/Stress_test.c.format-security 2016-03-27 08:53:28.000000000 +0200
+++ openmx3.8/source/Stress_test.c 2016-04-18 00:25:58.961676972 +0200
@@ -199,13 +199,13 @@ void Stress_test(int argc, char *argv[])
strcpy(tmp_argv,argv[3]);
tp = strtok(tmp_argv," ");
- sprintf(str[0],tp);
+ sprintf(str[0],"%s",tp);
p = 1;
while (tp != NULL ){
tp = strtok(NULL," ");
if (tp!=NULL){
- sprintf(str[p],tp);
+ sprintf(str[p],"%s",tp);
p++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment