Skip to content

Instantly share code, notes, and snippets.

@marcindulak
Created February 20, 2017 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcindulak/f54b81616c722c64a5b11cc0c64f9474 to your computer and use it in GitHub Desktop.
Save marcindulak/f54b81616c722c64a5b11cc0c64f9474 to your computer and use it in GitHub Desktop.
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